Skip to content

Commit

Permalink
add bson tags to policy
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Dec 26, 2023
1 parent 025cd2f commit 10b4f63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions portfolio.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ func (pf *Specification) BacktestWithStartAndEndTime(ctx context.Context, start,
}

type Policy struct {
RebalancingInterval backtestconfig.Interval `yaml:"rebalancing_interval,omitempty"`
RebalancingInterval backtestconfig.Interval `yaml:"rebalancing_interval,omitempty" bson:"rebalancing_interval"`

Weights []float64 `yaml:"weights,omitempty"`
WeightsAlgorithm string `yaml:"weights_algorithm,omitempty"`
WeightsAlgorithmLookBack backtestconfig.Window `yaml:"weights_algorithm_look_back_window,omitempty"`
WeightsUpdatingInterval backtestconfig.Interval `yaml:"weights_updating_interval,omitempty"`
Weights []float64 `yaml:"weights,omitempty" bson:"weights"`
WeightsAlgorithm string `yaml:"weights_algorithm,omitempty" bson:"weights_algorithm"`
WeightsAlgorithmLookBack backtestconfig.Window `yaml:"weights_algorithm_look_back_window,omitempty" bson:"weights_algorithm_look_back_window"`
WeightsUpdatingInterval backtestconfig.Interval `yaml:"weights_updating_interval,omitempty" bson:"weights_updating_interval"`
}

// Validate does some simple validations.
Expand Down

0 comments on commit 10b4f63

Please sign in to comment.