Optimizing/goal seeking a multiple input formula

hepcat8

New Member
Joined
Jan 1, 2008
Messages
2
I have 15 years of weekly data that I am backtesting for its ability to predict future stock market returns. The model works as follows: when a weekly observation is more than x standard deviations above its y-week moving average a sell signal is generated, when the observation is z standard deviations below its y-week moving average a buy signal is generated, and if an observation falls within the x and z standard deviation band the prior Buy or Sell signal is maintained. I have created a spreadsheet with dynamic moving averages and standard deviation formulas that allow me to change the cell values for x, y, and z and use IF statements to generate either a BUY or SELL signal for each week and then calculate the fifteen year return (Rt) of my model versus an index over this same period.

The problem is that I am trying to maximize Rt given three variables (x, y, and z) and my current approach is to manually plug random guesses in for the value of x, y and z. Using this approach I will never know what the optimal combination of x, y and z are to maximize Rt. Is there an excel formula that I could use to optimize Rt? I am familiar with goal seek which is theoretically what I am trying to accomplish but since I don't know the value for Rt and I have more than one input it is not usable. Any help is much appreciated. Thank you.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Check out the Solver add-in (Tools | Solver...) Of course, this addresses only your question of a 3 variable optimization. I don't believe one can predict future stock returns based on past performance but obviously you do.
 
Upvote 0
Thanks. I will look into the solver. Also, to clarify: the model is not trying to predict future returns based on past performance, it is predicting future returns based on some other data series that I did not identify.
 
Upvote 0

Forum statistics

Threads
1,223,676
Messages
6,173,758
Members
452,534
Latest member
autodiscreet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top