示例#1
0
 public BackTestingStockReport( TradingResult tradingResult )
     : base(tradingResult.Stock.Isin, "BackTestingDetails", "BackTesting details")
 {
     Sections.Add( CreateOverviewSection( tradingResult ) );
     Sections.Add( CreateChartSection( tradingResult ) );
     Sections.Add( CreateTableSection( tradingResult ) );
 }
示例#2
0
 public BackTestingStockReport(TradingResult tradingResult)
     : base(tradingResult.Stock.Isin, "BackTestingDetails", "BackTesting details")
 {
     Sections.Add(CreateOverviewSection(tradingResult));
     Sections.Add(CreateChartSection(tradingResult));
     Sections.Add(CreateTableSection(tradingResult));
 }
示例#3
0
        public void AddResult( TradingResult result )
        {
            var row = new TableRow( myTestResultSection );
            row[ "Stock" ] = result.Stock;
            row[ "Gain" ] = new ValueWithDetails( result.GainPerAnno, new BackTestingStockReport( result ) );

            myTestResultSection.Rows.Add( row );
        }
示例#4
0
        public void AddResult(TradingResult result)
        {
            var row = new TableRow(myTestResultSection);

            row["Stock"] = result.Stock;
            row["Gain"]  = new ValueWithDetails(result.GainPerAnno, new BackTestingStockReport(result));

            myTestResultSection.Rows.Add(row);
        }
示例#5
0
        private AbstractSection CreateOverviewSection( TradingResult tradingResult )
        {
            var section = new KeyValueSection( "Overview" );
            section.Entries[ "Stock" ] = tradingResult.Stock;
            section.Entries[ "Inital cash" ] = tradingResult.InitialCash;
            section.Entries[ "Portfolio value" ] = tradingResult.PortfolioValue;
            section.Entries[ "Gain per anno" ] = tradingResult.GainPerAnno;

            return section;
        }
示例#6
0
        private AbstractSection CreateOverviewSection(TradingResult tradingResult)
        {
            var section = new KeyValueSection("Overview");

            section.Entries["Stock"]           = tradingResult.Stock;
            section.Entries["Inital cash"]     = tradingResult.InitialCash;
            section.Entries["Portfolio value"] = tradingResult.PortfolioValue;
            section.Entries["Gain per anno"]   = tradingResult.GainPerAnno;

            return(section);
        }
示例#7
0
        private AbstractSection CreateTableSection(TradingResult tradingResult)
        {
            var header  = new TableHeader("Date", "Action", "Price", "Quantity", "Value");
            var section = new TableSection("Orders", header);

            foreach (var order in tradingResult.TradingLog.Orders)
            {
                var row = section.NewRow(order.Timestamp, order.Type, order.Price, order.Quantity, order.NettoValue);
                section.Rows.Add(row);
            }

            return(section);
        }
示例#8
0
        private AbstractSection CreateTableSection( TradingResult tradingResult )
        {
            var header = new TableHeader( "Date", "Action", "Price", "Quantity", "Value" );
            var section = new TableSection( "Orders", header );

            foreach ( var order in tradingResult.TradingLog.Orders )
            {
                var row = section.NewRow( order.Timestamp, order.Type, order.Price, order.Quantity, order.NettoValue );
                section.Rows.Add( row );
            }

            return section;
        }
示例#9
0
        private GenericChartSection CreateChartSection( TradingResult tradingResult )
        {
            var chart = new StockPriceChart( "TradingProtocol", tradingResult.Stock, tradingResult.Prices );

            var trades = tradingResult.TradingLog.Orders
                .Select( o => o.Timestamp )
                .ToList();
            var signals = tradingResult.SystemSignals
                .Where( s => trades.Contains( s.Time ) );
            chart.Signals = new SignalSeries( tradingResult.Prices, new SeriesIdentifier( new StockObjectIdentifier( tradingResult.Stock ), new ObjectDescriptor( "Trading" ) ), signals );

            AddIndicators( chart, tradingResult.SystemReport );

            var section = new GenericChartSection( "Chart", chart );
            return section;
        }
示例#10
0
        private GenericChartSection CreateChartSection(TradingResult tradingResult)
        {
            var chart = new StockPriceChart("TradingProtocol", tradingResult.Stock, tradingResult.Prices);

            var trades = tradingResult.TradingLog.Orders
                         .Select(o => o.Timestamp)
                         .ToList();
            var signals = tradingResult.SystemSignals
                          .Where(s => trades.Contains(s.Time));

            chart.Signals = new SignalSeries(tradingResult.Prices, new SeriesIdentifier(new StockObjectIdentifier(tradingResult.Stock), new ObjectDescriptor("Trading")), signals);

            AddIndicators(chart, tradingResult.SystemReport);

            var section = new GenericChartSection("Chart", chart);

            return(section);
        }
示例#11
0
 public ResultAdapter(TradingResult result)
 {
     myResult = result;
 }
示例#12
0
 public ResultAdapter( TradingResult result )
 {
     myResult = result;
 }