SimpleReturnsSeries

class qf_lib.containers.series.simple_returns_series.SimpleReturnsSeries(data: Optional[object] = None, index: Optional[object] = None, dtype: Optional[object] = None, name: Optional[object] = None, copy: bool = False, fastpath: bool = False)[source]

Bases: ReturnsSeries

Series of simple returns.

Methods:

to_log_returns()

Converts timeseries to the timeseries of logarithmic returns.

to_simple_returns()

Converts timeseries to the timeseries of simple returns.

total_cumulative_return()

Calculates the total cumulative return for the series.

to_log_returns() LogReturnsSeries[source]

Converts timeseries to the timeseries of logarithmic returns. First date of prices in the returns timeseries won’t be present.

Returns:

timeseries of log returns

Return type:

LogReturnsSeries

to_simple_returns() SimpleReturnsSeries[source]

Converts timeseries to the timeseries of simple returns. First date of prices in the returns timeseries won’t be present.

Returns:

timeseries of simple returns

Return type:

SimpleReturnsSeries

total_cumulative_return() float[source]

Calculates the total cumulative return for the series.