public Portfolio(Framework framework, string name = "") { this.framework = framework; this.name = name; this.account = new Account(framework); this.fills = new FillSeries(name); this.positions = new List <Position>(); this.positionByInstrument = new IdArray <Position>(1000); this.pricer = framework.portfolioManager.pricer; this.performance = new PortfolioPerformance(this); this.statistics = new PortfolioStatistics(this); }
public Portfolio(Framework framework, string name = "") { this.framework = framework; this.name = name; this.account = new Account(framework); this.fills = new FillSeries(name); this.positions = new List<Position>(); this.positionByInstrument = new IdArray<Position>(1000); this.pricer = framework.portfolioManager.pricer; this.performance = new PortfolioPerformance(this); this.statistics = new PortfolioStatistics(this); }
private TimeSeries GetTimeSeries(PortfolioStatistics portfolioStatistics) { foreach (PortfolioStatisticsItem portfolioStatisticsItem in portfolioStatistics.Items) { if (portfolioStatisticsItem.Name == this.statisticsName) return portfolioStatisticsItem.TotalValues; } return (TimeSeries) null; }