Class WalkForwardOptimizer
- Namespace
- Balsam.Optimization
- Assembly
- Balsam.Backtester.dll
A class for performing walk forward optimizations.
public class WalkForwardOptimizer : OptimizerBase
- Inheritance
-
WalkForwardOptimizer
- Inherited Members
- Extension Methods
Properties
ObjectiveFunction
Gets/sets the objective function. If null, Sharpe Ratio is used as the default.
public Func<TradeStats, double> ObjectiveFunction { get; set; }
Property Value
Results
Gets the results of the walk forward optimization.
public WalkForwardResults Results { get; }
Property Value
Methods
GetResults()
Not implemented.
public override TradeStatsCollection GetResults()
Returns
Exceptions
Optimize(MoneyManager, IEnumerable<WalkForwardSlice>)
Optimizes a money manager over the specified slices.
public void Optimize(MoneyManager moneyManager, IEnumerable<WalkForwardSlice> slices)
Parameters
moneyManager
MoneyManagerslices
IEnumerable<WalkForwardSlice>
Exceptions
Optimize(Strategy, IEnumerable<WalkForwardSlice>)
Optimizes a strategy over the specified slices.
public void Optimize(Strategy strategy, IEnumerable<WalkForwardSlice> slices)
Parameters
strategy
Strategyslices
IEnumerable<WalkForwardSlice>
Optimize(Type, VariableDictionary, Type, VariableDictionary, IEnumerable<BarSeries>, IEnumerable<WalkForwardSlice>)
Optimizes the specified strategy. Note this will automatically close open positions at the end of the OOS walk-forward window.
public void Optimize(Type strategy, VariableDictionary vd, Type moneyManager, VariableDictionary mmvd, IEnumerable<BarSeries> data, IEnumerable<WalkForwardSlice> slices)
Parameters
strategy
Typevd
VariableDictionarymoneyManager
Typemmvd
VariableDictionarydata
IEnumerable<BarSeries>slices
IEnumerable<WalkForwardSlice>
Optimize(Type, VariableDictionary, Type, VariableDictionary, IEnumerable<BarSeries>, IEnumerable<OptimizeAttribute>, IComputePool, IProgress<double>, CancellationToken)
Not implemented.
public override void Optimize(Type strategy, VariableDictionary strategyProperties, Type moneyManager, VariableDictionary moneyManagerProperties, IEnumerable<BarSeries> data, IEnumerable<OptimizeAttribute> optimizationAttributes, IComputePool computePool, IProgress<double> progress, CancellationToken token)
Parameters
strategy
TypestrategyProperties
VariableDictionarymoneyManager
TypemoneyManagerProperties
VariableDictionarydata
IEnumerable<BarSeries>optimizationAttributes
IEnumerable<OptimizeAttribute>computePool
IComputePoolprogress
IProgress<double>token
CancellationToken