public BackTestingStockReport( TradingResult tradingResult ) : base(tradingResult.Stock.Isin, "BackTestingDetails", "BackTesting details") { Sections.Add( CreateOverviewSection( tradingResult ) ); Sections.Add( CreateChartSection( tradingResult ) ); Sections.Add( CreateTableSection( tradingResult ) ); }
public BackTestingStockReport(TradingResult tradingResult) : base(tradingResult.Stock.Isin, "BackTestingDetails", "BackTesting details") { Sections.Add(CreateOverviewSection(tradingResult)); Sections.Add(CreateChartSection(tradingResult)); Sections.Add(CreateTableSection(tradingResult)); }
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 ); }
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); }
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; }
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); }
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); }
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; }
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; }
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); }
public ResultAdapter(TradingResult result) { myResult = result; }
public ResultAdapter( TradingResult result ) { myResult = result; }