Preferred Values not saved?
Author: sdbens20
Creation Date: 2/8/2011 12:15 PM
profile picture

sdbens20

#1
I would like to optimize a strategy on a dataset. My hope is that after running the optimization, I can save the best strategy parameters for each symbol in the dataset. I am unable to get the best parameters displayed in the optimization results to save and be used when the stratgey monitor is opened later.

I have run a dataset Monte Carlo optimization using the highest value of net profit as my "Metric to Optimize". Scale is daily, data range is 1 year, and the raw profit mode with a fixed dollar value is selected. When the results window opens after the dataset optimization has completed, I sort to determine the best parameters for each of the 4 symbols in this test dataset. The symbols, parameters, and net profits are as follows:

.DJI: 42, 74, 71, 171, 83, 155, 127, 24 $183377
DJP: 2, 54, 91, 51, 59, 21, 55, 147 $318884
GCC: 4, 54, 15, 29, 105, 107, 97, 69 $313297
SH: 110, 184, 21, 125, 3, 111, 100, 167 $405992

I then right-click in the results window to get a pop-up that allows me to select "Assign Preferred Values based on the highest metric value per symbol." I'm thinking that this selection will save the parameter values for each symbol as shown above and that I should to be able recall each symbol with its own best parameters for this specific strategy. This selection is chosen and a snall box with "PV" appears in the lower right-hand cover of the window.

Next, I enter "Ctrl-S" to save the strategy (or am I saving something else?). The window is closed, chosing to change the strategy during closure. WLP is closed and reopened.

Strategy monitor is opened and the new strategy is added, selecting the test dataset name in the Strategy Activation Settings window and choosing "Use Preferred Strategy Parameter Values assigned in Optimization". In the Strategies window , the new strategy is activated and ran. One alert sounds.

Next, I click on .DJI in the Datasets window under the Test dataset. With the PV box active, .DJI's parameters are not the same as shown in the data above. Net profit is a much reduced $34234. Same kind of change has occurred in the other three symbols. None of the parameter sets and net profits match the data shown four paragraphs above.

Please let me know how I can get to saved versions of the good values shown four paragraphs above.

Thank you.

Sherm
profile picture

Cone

#2
QUOTE:
I'm thinking that this selection will save the parameter values for each symbol as shown above and that I should to be able recall each symbol with its own best parameters for this specific strategy.
That's correct.

QUOTE:
.DJI: 42, 74, 71, 171, 83, 155, 127, 24 $183377
I guess you know that you can't trade .DJI directly. What's the point of optimizing it in this way?

QUOTE:
I enter "Ctrl-S" to save the strategy (or am I saving something else?).
You should be saving the Strategy with all the PVs assigned. However, if you choose Save-As, then there's a problem with this - it won't save the PVs. That will be fixed in 6.2.

QUOTE:
how I can get to saved versions of the good values shown four paragraphs above.
Are you sure that you "Saved" and not "Save-As"?
profile picture

sdbens20

#3
QUOTE:
.DJI: 42, 74, 71, 171, 83, 155, 127, 24 $183377
I guess you know that you can't trade .DJI directly. What's the point of optimizing it in this way?


Yes, I do know. I do it to get an idea of what the market is doing.

QUOTE:
You should be saving the Strategy with all the PVs assigned. However, if you choose Save-As, then there's a problem with this - it won't save the PVs. That will be fixed in 6.2.


Does the process described in my original post accomplish this? Is that what entering "Ctrl-S" while in the results window does?

QUOTE:
Are you sure that you "Saved" and not "Save-As"?


This must be where my error is. At what point in the process I described in my original posting is it that I should be making the Save vs. Save As decision?
profile picture

Cone

#4
Ctrl+S should "Save" if you had already saved the script at least once. If it hasn't been saved once, then Ctrl+S will "Save As" and you have to give the script a name. I can't tell which is the case from your post.
profile picture

sdbens20

#5
Still can't get the optimized values for each symbol to save.

I just opened the following script (acwiw%r1):

CODE:
Please log in to see this code.

Here's my process:

1. Selected the 4 symbol test dataset.
2. Selected "Optimize" at the lower left of the window.
3. Selected Monte Carlo to optimize on net profits
4. Completed optimization on the dataset.
5. Right clicked on results window and selected "Assign Preferred Values based on the highest metric value per symbol".
6. Pop-up reported Preferred Values had been set for 4 symbols.
7. Entered "Ctrl-S" per WLP manual.
8. Closed results window.
9. Opened the Strategy Monitor.
10. Right-clicked on "acwiw%r1" in strategy listing and selected "Change Settings".
11. "Use Preferred Starategy Para..." was already checked.
12. Activated and ran "acwiw%r1". Got two alerts.
13. Doubled-clicked .DJI in "Test" dataset in Datasets window. Again, net profit did not match results in the optimizer's results window.

Where do you think my error is?
profile picture

Cone

#6
1. Are you running over the same data range as in the optimization?
2. Is the sizing precisely the same?
3. Is the PV button enabled in the lower right corner of the Strategy Window?
4. If it is, are the parameters showing the correct PV configuration? If not, do the parameters change when you enable/disable the PV button?
profile picture

sdbens20

#7
Yes, Yes, Yes, No, and Yes. The PV's do not chnage to the correct value when the PV button is either on or off.

profile picture

sdbens20

#8
Any new ideas on my problem?
profile picture

Cone

#9
Oh gosh, you didn't give the Parameters unique names. You duplicated "Period" and "Smoothing" 4 times each. Change the names, save the script, close it, then repeat the procedure.
profile picture

sdbens20

#10
It's working, now. Thanks!!

The script was created quite a while ago by listing rules and then letting WLP convert it to script.

Thanks, again.

Sherm
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).