Backtest on multiple stocks & aggregate results #468
-
Is there a way to test the same strategy on multiple stocks and show the aggregate of results from |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think the difference between your method stems from the fact that I want to compare strategies’ overall performance on multiple tickers vs compare how each strategy performs on each ticker. So I would have to take average of -for example- Max DD and Sharpe Ratios of all tickers for Strategy no1 and compare it to the average of all SR from Strategy no2. I guess the solution is the same as you suggested where I have to take averages per field for each strategy and sort+compare
From: @AGG2017
You can loop the run over a list of stocks, to collect the stats in a list and then to sort that list by different criteria to find the best matches for this strategy. Even the results can be exported to excel for further analysis and presentations. What exactly do you mean by aggregation other than comparing by sorting?
|
Beta Was this translation helpful? Give feedback.
-
For me there is no big difference how you will interpret the results. The main method is to loop the run over several tickers, get the results and accumulate them in one pandas series object, like the index is the stock list, the columns are the stat result (all or selected one), and with pandas you can have all statistics over the result from one strategy for your list of stocks (averages, standard deviation, max/min, etc.). Repeat this for all you strategy and finally you can compare the result statistics from all series. |
Beta Was this translation helpful? Give feedback.
For me there is no big difference how you will interpret the results. The main method is to loop the run over several tickers, get the results and accumulate them in one pandas series object, like the index is the stock list, the columns are the stat result (all or selected one), and with pandas you can have all statistics over the result from one strategy for your list of stocks (averages, standard deviation, max/min, etc.). Repeat this for all you strategy and finally you can compare the result statistics from all series.