Lean  $LEAN_TAG$
QuantConnect.Report.DeedleUtil Class Reference

Utility extension methods for Deedle series/frames More...

Static Public Member Functions

static Series< DateTime, double > CumulativeSum (this Series< DateTime, double > input)
 Calculates the cumulative sum for the given series More...
 
static Series< DateTime, double > CumulativeProduct (this Series< DateTime, double > input)
 Calculates the cumulative product of the series. This is equal to the python pandas method: df.cumprod() More...
 
static Series< DateTime, double > CumulativeMax (this Series< DateTime, double > input)
 Calculates the cumulative max of the series. This is equal to the python pandas method: df.cummax(). More...
 
static Series< DateTime, double > PercentChange (this Series< DateTime, double > input)
 Calculates the percentage change from the previous value to the current More...
 
static Series< DateTime, double > CumulativeReturns (this Series< DateTime, double > input)
 Calculates the cumulative returns series of the given input equity curve More...
 
static double TotalReturns (this Series< DateTime, double > input)
 Calculates the total returns over a period of time for the given input More...
 
static Frame< TRowKey, TColumnKey > DropSparseColumnsAll< TRowKey, TColumnKey > (this Frame< TRowKey, TColumnKey > frame)
 Drops sparse columns only if every value is missing in the column More...
 
static Frame< TRowKey, TColumnKey > DropSparseRowsAll< TRowKey, TColumnKey > (this Frame< TRowKey, TColumnKey > frame)
 Drops sparse rows if and only if every value is missing in the Frame More...
 

Detailed Description

Utility extension methods for Deedle series/frames

Definition at line 26 of file DeedleUtil.cs.

Member Function Documentation

◆ CumulativeSum()

static Series<DateTime, double> QuantConnect.Report.DeedleUtil.CumulativeSum ( this Series< DateTime, double >  input)
static

Calculates the cumulative sum for the given series

Parameters
inputSeries to calculate cumulative sum for
Returns
Cumulative sum in series form

Definition at line 33 of file DeedleUtil.cs.

◆ CumulativeProduct()

static Series<DateTime, double> QuantConnect.Report.DeedleUtil.CumulativeProduct ( this Series< DateTime, double >  input)
static

Calculates the cumulative product of the series. This is equal to the python pandas method: df.cumprod()

Parameters
inputInput series
Returns
Cumulative product

Definition at line 56 of file DeedleUtil.cs.

◆ CumulativeMax()

static Series<DateTime, double> QuantConnect.Report.DeedleUtil.CumulativeMax ( this Series< DateTime, double >  input)
static

Calculates the cumulative max of the series. This is equal to the python pandas method: df.cummax().

Parameters
input
Returns

Definition at line 79 of file DeedleUtil.cs.

◆ PercentChange()

static Series<DateTime, double> QuantConnect.Report.DeedleUtil.PercentChange ( this Series< DateTime, double >  input)
static

Calculates the percentage change from the previous value to the current

Parameters
inputSeries to calculate percentage change for
Returns
Percentage change in series form

Equivalent to df.pct_change()

Definition at line 108 of file DeedleUtil.cs.

Here is the caller graph for this function:

◆ CumulativeReturns()

static Series<DateTime, double> QuantConnect.Report.DeedleUtil.CumulativeReturns ( this Series< DateTime, double >  input)
static

Calculates the cumulative returns series of the given input equity curve

Parameters
inputEquity curve series
Returns
Cumulative returns over time

Definition at line 125 of file DeedleUtil.cs.

◆ TotalReturns()

static double QuantConnect.Report.DeedleUtil.TotalReturns ( this Series< DateTime, double >  input)
static

Calculates the total returns over a period of time for the given input

Parameters
inputEquity curve series
Returns
Total returns over time

Definition at line 142 of file DeedleUtil.cs.

◆ DropSparseColumnsAll< TRowKey, TColumnKey >()

static Frame<TRowKey, TColumnKey> QuantConnect.Report.DeedleUtil.DropSparseColumnsAll< TRowKey, TColumnKey > ( this Frame< TRowKey, TColumnKey >  frame)
static

Drops sparse columns only if every value is missing in the column

Template Parameters
TRowKeyFrame row key
TColumnKeyFrame column key
Parameters
frameData Frame
Returns
new Frame with sparse columns dropped

Equivalent to ‘df.dropna(axis=1, how='all’)`

Definition at line 162 of file DeedleUtil.cs.

◆ DropSparseRowsAll< TRowKey, TColumnKey >()

static Frame<TRowKey, TColumnKey> QuantConnect.Report.DeedleUtil.DropSparseRowsAll< TRowKey, TColumnKey > ( this Frame< TRowKey, TColumnKey >  frame)
static

Drops sparse rows if and only if every value is missing in the Frame

Template Parameters
TRowKeyFrame row key
TColumnKeyFrame column key
Parameters
frameData Frame
Returns
new Frame with sparse rows dropped

Equivalent to ‘df.dropna(how='all’)`

Definition at line 185 of file DeedleUtil.cs.


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