Incorrect calculation of statistical metric related to annually,monthly,weekly,daily P&L .

In fact, in the previous task, I have mentioned this about difference SQ and MC. Some troubles about the difference of backtest results between SQ and MC - Strategy Quant With the deepening of my recent experience of SQ, I think it is necessary to resubmit a new task. I hope to elaborate on this issue more completely.


In SQ, all annually,monthly,weekly,daily P&L are calculated according to the close time or open time of the trade. This brings great trouble to our strategy research and deploy. 


1. First, It will greatly affect the profit calculation for each day,each month, each year. It is not ture P&L with in the specified period. Obviously, we often encounter a huge different performance between sq and MC/TS platforms. We have to further look for reason and detail. So we have to check differences on an annual and monthly P&L, then try to find key trade which causing performance differences.        This process becomes very inefficient due to the wrong way of calculation in SQ.


2. Usually we will check strategies again two months after the development. That is true OOS.If there is a long hold position at the boundary between IS and OOS,  calculation of OOS P&L will be greatly deviated.


3. The scariest thing is that there are some metrics that are highly correlated with annually,monthly,weekly,daily P&L. They are also the key bases for choosing strategies to enter automatic trading. For example, Sharp ratio, Sortino ratio, Portfolio correlation by Day P&L, Stability and so on.
   Be honest, in my experience, Sharp ratio and portfolio correlation by Day P&L(Especially the portfolio of same symbol.) in SQ is unreliable. They are often calculated to be too optimistic. Although I can do the calculation and validation again in the MC/TS, this results in very low efficiency on strategy selection and portfolio management. By the way, i vaguely feel that there are some differences between metric stabiltiy value and my intuitive feeling of the equity curve.(i don't sure, just feeling, It seems that StabiltySQ3 is more accurate than Stability). 


      I think this maybe the main reason why there are huge different performance report between SQ and MC/TS platform.  I think annually,monthly,weekly,daily P&L have to consider open profit. We have to obtain price(close) according to the period boundary,combining the entry price of last period and the exit  price of next period, and then calculate open profit of two periods independently. 
     Hopefully the development team will fix this as soon as possible, and I hope SQX get better and more perfect.

Attachments
trade analysis.png
(122.69 KiB)
  • Votes +2
  • Project StrategyQuant X
  • Type Bug
  • Status New
  • Priority Normal

History

b
#1

binhsir

30.07.2023 05:41

Task created

b
#2

binhsir

30.07.2023 05:41
Voted for this task.
E
#3

Emmanuel

06.08.2023 15:23
Voted for this task.

Votes: +2

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please