Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var START_VALUE float64 = 1000
START_VALUE is how much money the strategy starts with when tracking trades
Functions ¶
func CalculateDailyPortfolioValues ¶
func CalculateDailyPortfolioValues(outcomes *StrategyOutcomes, pricesPtr *[]metric.Metric) *[]float64
Types ¶
type StrategyOutcomes ¶
type StrategyOutcomes struct { PurchaseDates []time.Time `json:"purchaseDates"` SellDates []time.Time `json:"sellDates"` FinalValue float64 `json:"finalValue"` Positions []Position `json:"positions"` Settings map[string]string `json:"settings"` }
func RunBuyAndHold ¶
func RunBuyAndHold(firstAllowedBuyDate time.Time, pricesPtr *[]metric.Metric) *StrategyOutcomes
Click to show internal directories.
Click to hide internal directories.