Hi all,
I'm building a worksheet to analyze the stock market, specifically the performance of a number of symbols between two variable dates in time.
I'm struggling with how to implement a system that allows for a variable start and end date for the backtest period as well as a variable holding period for the stocks.
Specifically, if I set start and end dates as 1/1/2000 and 1/1/2010, a backtest period of 3 months and a holding period of 1 months: I'm taking my 20 ticker symbols, calculating their performance with my system over the 3 months prior to 1/1/2000 (resulting in a percentage gain for each symbol). The sheet then choses the best X number of these. It owns them for the variable holding period, in this example 1 month. It calculates the average return for that holding period and then repeats.
I had no difficulty setting up a static chart with these inputs - but to make the holding period variable seems to have moved beyond my expertise as I am simply unable to make sense of how to capture the % gain for the variable holding period going forward. Using start date + 1 month is easy to establish the first date for calculation but going beyond that... ugh.
Any ideas here would be immensely appreciated!
Thanks,
Brian
I'm building a worksheet to analyze the stock market, specifically the performance of a number of symbols between two variable dates in time.
I'm struggling with how to implement a system that allows for a variable start and end date for the backtest period as well as a variable holding period for the stocks.
Specifically, if I set start and end dates as 1/1/2000 and 1/1/2010, a backtest period of 3 months and a holding period of 1 months: I'm taking my 20 ticker symbols, calculating their performance with my system over the 3 months prior to 1/1/2000 (resulting in a percentage gain for each symbol). The sheet then choses the best X number of these. It owns them for the variable holding period, in this example 1 month. It calculates the average return for that holding period and then repeats.
I had no difficulty setting up a static chart with these inputs - but to make the holding period variable seems to have moved beyond my expertise as I am simply unable to make sense of how to capture the % gain for the variable holding period going forward. Using start date + 1 month is easy to establish the first date for calculation but going beyond that... ugh.
Any ideas here would be immensely appreciated!
Thanks,
Brian