Tag Info

Hot answers tagged

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. ...


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 ...



Only top voted, non community-wiki answers of a minimum length are eligible