Lean  $LEAN_TAG$
BaseResultParameters.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15 */
16 
17 using System;
18 using QuantConnect.Orders;
19 using System.Collections.Generic;
20 
21 namespace QuantConnect.Packets
22 {
23  /// <summary>
24  /// Base parameters used by <see cref="LiveResultParameters"/> and <see cref="BacktestResultParameters"/>
25  /// </summary>
26  public class BaseResultParameters
27  {
28  /// <summary>
29  /// Trade profit and loss information since the last algorithm result packet
30  /// </summary>
31  public IDictionary<DateTime, decimal> ProfitLoss { get; set; }
32 
33  /// <summary>
34  /// Charts updates for the live algorithm since the last result packet
35  /// </summary>
36  public IDictionary<string, Chart> Charts { get; set; }
37 
38  /// <summary>
39  /// Order updates since the last result packet
40  /// </summary>
41  public IDictionary<int, Order> Orders { get; set; }
42 
43  /// <summary>
44  /// Order events updates since the last result packet
45  /// </summary>
46  public List<OrderEvent> OrderEvents { get; set; }
47 
48  /// <summary>
49  /// Statistics information sent during the algorithm operations.
50  /// </summary>
51  public IDictionary<string, string> Statistics { get; set; }
52 
53  /// <summary>
54  /// Runtime banner/updating statistics in the title banner of the live algorithm GUI.
55  /// </summary>
56  public IDictionary<string, string> RuntimeStatistics { get; set; }
57 
58  /// <summary>
59  /// State information of the algorithm.
60  /// </summary>
61  public IDictionary<string, string> State { get; set; }
62 
63  /// <summary>
64  /// The algorithm's configuration required for report generation
65  /// </summary>
67 
68  /// <summary>
69  /// Creates a new instance
70  /// </summary>
71  public BaseResultParameters(IDictionary<string, Chart> charts,
72  IDictionary<int, Order> orders,
73  IDictionary<DateTime, decimal> profitLoss,
74  IDictionary<string, string> statistics,
75  IDictionary<string, string> runtimeStatistics,
76  List<OrderEvent> orderEvents,
77  AlgorithmConfiguration algorithmConfiguration = null,
78  IDictionary<string, string> state = null)
79  {
80  Charts = charts;
81  Orders = orders;
82  ProfitLoss = profitLoss;
83  Statistics = statistics;
84  RuntimeStatistics = runtimeStatistics;
85  OrderEvents = orderEvents;
86  AlgorithmConfiguration = algorithmConfiguration;
87  State = state;
88  }
89  }
90 }