// Make creates a new empty portfolio func MakeOptions(e *engine.Handle) *OptionsPortfolio { return &OptionsPortfolio{ Portfolio{ e: e, positions: collection.Make(e), }, } }
// Cleanup removes all positions from portfolio // and shuts down the market date update loop func (self *Portfolio) Cleanup() { self.mutex.Lock() defer self.mutex.Unlock() self.positions.Cleanup() self.positions = collection.Make(self.e) }
// Make creates a new empty portfolio func Make(e *engine.Handle) *Portfolio { return &Portfolio{ e: e, positions: collection.Make(e), } }