Lean  $LEAN_TAG$
QuantConnect.Packets.BacktestResultPacket Class Reference

Backtest result packet: send backtest information to GUI for user consumption. More...

Inheritance diagram for QuantConnect.Packets.BacktestResultPacket:
[legend]

Public Member Functions

 BacktestResultPacket ()
 Default constructor for JSON Serialization More...
 
 BacktestResultPacket (string json)
 Compose the packet from a JSON string: More...
 
 BacktestResultPacket (BacktestNodePacket job, BacktestResult results, DateTime endDate, DateTime startDate, decimal progress=1m)
 Compose result data packet - with tradable dates from the backtest job task and the partial result packet. More...
 
- Public Member Functions inherited from QuantConnect.Packets.Packet
 Packet (PacketType type)
 Initialize the base class and setup the packet type. More...
 

Static Public Member Functions

static BacktestResultPacket CreateEmpty (BacktestNodePacket job)
 Creates an empty result packet, useful when the algorithm fails to initialize More...
 

Properties

int UserId [get, set]
 User Id placing this task More...
 
int ProjectId [get, set]
 Project Id of the this task. More...
 
string SessionId = string.Empty [get, set]
 User Session Id More...
 
string BacktestId = string.Empty [get, set]
 BacktestId for this result packet More...
 
string OptimizationId [get, set]
 OptimizationId for this result packet if any More...
 
string CompileId = string.Empty [get, set]
 Compile Id for the algorithm which generated this result packet. More...
 
DateTime PeriodStart [get, set]
 Start of the backtest period as defined in Initialize() method. More...
 
DateTime PeriodFinish [get, set]
 End of the backtest period as defined in the Initialize() method. More...
 
DateTime DateRequested [get, set]
 DateTime (EST) the user requested this backtest. More...
 
DateTime DateFinished [get, set]
 DateTime (EST) when the backtest was completed. More...
 
decimal Progress [get, set]
 Progress of the backtest as a percentage from 0-1 based on the days lapsed from start-finish. More...
 
string Name = string.Empty [get, set]
 Name of this backtest. More...
 
BacktestResult Results = new () [get, set]
 Result data object for this backtest More...
 
double ProcessingTime [get, set]
 Processing time of the algorithm (from moment the algorithm arrived on the algorithm node) More...
 
int TradeableDates [get, set]
 Estimated number of tradeable days in the backtest based on the start and end date or the backtest More...
 
- Properties inherited from QuantConnect.Packets.Packet
PacketType Type = PacketType.None [get, set]
 Packet type defined by a string enum More...
 
virtual string Channel = "" [get, set]
 User unique specific channel endpoint to send the packets More...
 

Detailed Description

Backtest result packet: send backtest information to GUI for user consumption.

Definition at line 29 of file BacktestResultPacket.cs.

Constructor & Destructor Documentation

◆ BacktestResultPacket() [1/3]

QuantConnect.Packets.BacktestResultPacket.BacktestResultPacket ( )

Default constructor for JSON Serialization

Definition at line 109 of file BacktestResultPacket.cs.

Here is the caller graph for this function:

◆ BacktestResultPacket() [2/3]

QuantConnect.Packets.BacktestResultPacket.BacktestResultPacket ( string  json)

Compose the packet from a JSON string:

Definition at line 118 of file BacktestResultPacket.cs.

Here is the call graph for this function:

◆ BacktestResultPacket() [3/3]

QuantConnect.Packets.BacktestResultPacket.BacktestResultPacket ( BacktestNodePacket  job,
BacktestResult  results,
DateTime  endDate,
DateTime  startDate,
decimal  progress = 1m 
)

Compose result data packet - with tradable dates from the backtest job task and the partial result packet.

Parameters
jobJob that started this request
resultsResults class for the Backtest job
endDateThe algorithms backtest end date
startDateThe algorithms backtest start date
progressProgress of the packet. For the packet we assume progess of 100%.

Definition at line 160 of file BacktestResultPacket.cs.

Here is the call graph for this function:

Member Function Documentation

◆ CreateEmpty()

static BacktestResultPacket QuantConnect.Packets.BacktestResultPacket.CreateEmpty ( BacktestNodePacket  job)
static

Creates an empty result packet, useful when the algorithm fails to initialize

Parameters
jobThe associated job packet
Returns
An empty result packet

Definition at line 190 of file BacktestResultPacket.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Property Documentation

◆ UserId

int QuantConnect.Packets.BacktestResultPacket.UserId
getset

User Id placing this task

Definition at line 34 of file BacktestResultPacket.cs.

◆ ProjectId

int QuantConnect.Packets.BacktestResultPacket.ProjectId
getset

Project Id of the this task.

Definition at line 39 of file BacktestResultPacket.cs.

◆ SessionId

string QuantConnect.Packets.BacktestResultPacket.SessionId = string.Empty
getset

User Session Id

Definition at line 44 of file BacktestResultPacket.cs.

◆ BacktestId

string QuantConnect.Packets.BacktestResultPacket.BacktestId = string.Empty
getset

BacktestId for this result packet

Definition at line 49 of file BacktestResultPacket.cs.

◆ OptimizationId

string QuantConnect.Packets.BacktestResultPacket.OptimizationId
getset

OptimizationId for this result packet if any

Definition at line 54 of file BacktestResultPacket.cs.

◆ CompileId

string QuantConnect.Packets.BacktestResultPacket.CompileId = string.Empty
getset

Compile Id for the algorithm which generated this result packet.

Definition at line 59 of file BacktestResultPacket.cs.

◆ PeriodStart

DateTime QuantConnect.Packets.BacktestResultPacket.PeriodStart
getset

Start of the backtest period as defined in Initialize() method.

Definition at line 64 of file BacktestResultPacket.cs.

◆ PeriodFinish

DateTime QuantConnect.Packets.BacktestResultPacket.PeriodFinish
getset

End of the backtest period as defined in the Initialize() method.

Definition at line 69 of file BacktestResultPacket.cs.

◆ DateRequested

DateTime QuantConnect.Packets.BacktestResultPacket.DateRequested
getset

DateTime (EST) the user requested this backtest.

Definition at line 74 of file BacktestResultPacket.cs.

◆ DateFinished

DateTime QuantConnect.Packets.BacktestResultPacket.DateFinished
getset

DateTime (EST) when the backtest was completed.

Definition at line 79 of file BacktestResultPacket.cs.

◆ Progress

decimal QuantConnect.Packets.BacktestResultPacket.Progress
getset

Progress of the backtest as a percentage from 0-1 based on the days lapsed from start-finish.

Definition at line 84 of file BacktestResultPacket.cs.

◆ Name

string QuantConnect.Packets.BacktestResultPacket.Name = string.Empty
getset

Name of this backtest.

Definition at line 89 of file BacktestResultPacket.cs.

◆ Results

BacktestResult QuantConnect.Packets.BacktestResultPacket.Results = new ()
getset

Result data object for this backtest

Definition at line 94 of file BacktestResultPacket.cs.

◆ ProcessingTime

double QuantConnect.Packets.BacktestResultPacket.ProcessingTime
getset

Processing time of the algorithm (from moment the algorithm arrived on the algorithm node)

Definition at line 99 of file BacktestResultPacket.cs.

◆ TradeableDates

int QuantConnect.Packets.BacktestResultPacket.TradeableDates
getset

Estimated number of tradeable days in the backtest based on the start and end date or the backtest

Definition at line 104 of file BacktestResultPacket.cs.


The documentation for this class was generated from the following file: