Strategy Parameter not changing NetProfit in Optimization
Author: marrtw
Creation Date: 12/4/2017 10:15 PM
profile picture

marrtw

#1
The code below compiles fine but the Strategy Parameter does not change Net Profit during Optimization. When I replace p.EntryPrice * ivSell with p.EntryPrice * (any number) it works fine. Both p.EntryPrice and ivSell are doubles so I'm not sure what's wrong.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
It does change Net Profit during Optimization. See for yourself:

profile picture

marrtw

#3
Well, that's embarrassing. I spent hours on this problem.

Apparently, the period under test is not long enough (not enough bars...2 years Daily on Dow 30). Or, the Particle Swarm (GPAC PSO) algorithm aborts because the variance between tests is below some threshold (that's a guess). Just tried Exhaustive with same result.

profile picture

Eugene

#4
Embarrassing, yes. I optimized on 10 years.
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).