Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 private TimeSeries GetTimeSeries(PortfolioStatistics portfolioStatistics)
 {
   foreach (PortfolioStatisticsItem portfolioStatisticsItem in portfolioStatistics.Items)
   {
     if (portfolioStatisticsItem.Name == this.statisticsName)
       return portfolioStatisticsItem.TotalValues;
   }
   return (TimeSeries) null;
 }