# Tag Info

1

I think that the approach suggested by @Alex is pretty standard and I have seen such charts before but for a less orthodox approach that may clean up the graphics a bit, you might consider the final cumulative return as a segmented bar or pie chart (though I might discourage pie chart). See this example of a segmented bar for what I'm talking about. Each bar ...

0

It is similar to a Diebold and Mariano test. It tests whether series1 minus series2 is positive or negative, while taking into account the possibility there is autocorrelation. If you had normal i.i.d data you could just look at series1-series2 and do a Student t-test as to whether the differences are on average zero or not. This is a fancy way of doing it, ...

2

When position = 1, then you are long the S&P ETF. When position is -1, your portfolio consist of a short position of -1 S&P ETF. You will therefore have a vector like $Pos = (1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1, \ldots)$, that will give you the evolution of your portfolio. Your returns are then the daily returns on the S&P multiplied by your ...

2

Yes, that can be really sophisticated even using such nice tools as pandas. But the basic idea is to find position enters & exits to derive cashflow. Here is my code to derive all that stuff from generated signals (in my backtester signals are fractions of 2 stocks in portfolio for each moment). I hope I've found all bugs here, but no warranties. ...

Top 50 recent answers are included