common
enums
Enumeration representing different expiration dates for futures contracts. |
|
Frequency enumeration. |
|
Represents one of the data fields that corresponds to OHLC and Volume. |
|
Enum which denotes the type of the security, that the ticker is representing e.g. |
|
An enumeration. |
exceptions
Exception thrown when a Broker's operation fails. |
|
Order couldn't be cancelled (e.g. |
|
Exception raised when there is no valid specific Ticker for a certain FutureTicker at a given point in time. |
risk_parity_boxes
An enumeration. |
|
Makes timeseries for risk parity boxes. |
tickers
Representation of a security. |
|
Representation of Bloomberg tickers. |
|
Haver tickers representation. |
|
Representation of Quandl tickers. |
|
Representation of Cryptocurrency tickers. |
|
Representation of Portara tickers. |
timeseries_analysis
Class used for calculating metrics of performance attribution. |
|
Calculates risk contribution metrics. |
utils
Classes
Class defining date formats (as strings). |
|
Timer object which is a component in IOC. |
|
Timer which gives the real current time. |
|
Timer object which doesn't give the real current time, but is "faking" it (current time can be set). |
|
Class grouping the results of factorization. |
|
Class storing an input data from which FactorizationDataModel is built. |
|
|
Class for estimating parameters of rolling windows. |
Class used for presenting the data stored in the FactorizationDataModel. |
|
|
Class used for presenting the data stored in the RollingFactorizationDataModel. |
|
Class used for identifying factors in the model with Elastic Net method (with Cross-validation). |
Class used for identifying factors in the model with Elastic Net method (with Cross-validation). |
|
|
Class used for identifying factors in the model with Stepwise Regression (with Forward Feature Selection). |
Facade class for factorization. |
|
An enumeration. |
|
Stores values of stats used to build confidence interval (Cone Chart) |
|
|
|
Creates class used for vol forecasting: describes the volatility forecast configuration as well as the input and output data (output is created and assigned by calling one of the class methods). |
|
VolatilityManager uses rolling window to asses the historical volatility of a series. |
|
Cleans data which is partially incomplete, e.g. |
Functions
Calculates price changes during the night gap (opening price compared to closing price from the previous day). |
|
Finds the first and last valid dates (with a value different than NaN) for each column and then returns the latest of starting dates and the soonest ending date. |
|
Converts date object into string. |
|
Retrieves the quarter that the specified |
|
|
Gets list/tuple of series/dataframes (possibly mixed) and finds the common dates for all of them. |
Gregorian calendar date for the given ISO year, week and day. |
|
Converts string into date object. |
|
Converts Timedelta variable into number of days (expressed as float). |
|
Annualises samples of given frequency by multiplying each value by the square-rooted number of samples in a year for a given frequency. |
|
Calculates the average true range. |
|
|
Removes consecutive duplicates (e.g. |
While called inside a function or a class method it returns the name of the function/method that called it as a string. |
|
Calculates the value of the Kelly Criterion (the fraction of money that should be invested) for the series of returns/prices. |
|
Calculates the value of the Kelly Criterion (the fraction of money that should be invested) for a bet that has two possible outcomes. |
|
Uses a timeseries containing boolean values to create periods of True values. |
|
Converts a given value to list if necessary and returns information if the conversion was necessary. |
|
|
Aggregates prices in the prices_tms by calculating the average weighted price for each period. |
Checks if the given variable is number and if it is finite. |
|
Calculates the Calmar ratio for a given timeseries of returns. |
|
Calculates the gain to pain ratio for a given timeseries of returns. |
|
The function calculates information ratio based on monthly returns. |
|
Omega Ratio - The Omega Ratio is a measure of performance that doesn't assume a normal distribution of returns. |
|
Calculates the Sharpe Ratio for a given timeseries of returns and given frequency. |
|
Calculates the Sorino ratio for a given timeseries of returns. |
|
Calculates Annualised Rate of Return. |
|
Finds the average drawdown for the given timeseries of prices. |
|
Finds the average duration of a drawdown for the given timeseries of prices. |
|
Calculates alpha and beta of the series versus the benchmark series. |
|
Returns the Compound Annual Growth Rate (CAGR) calculated for the given series. |
|
|
Converts each column in the dataframe to the specified frequency. |
Aggregates returns using custom start dates and end dates. |
|
Calculates Conditional Value at Risk for a given percentage. |
|
Calculates the timeseries of the same dates as prices_tms, which contains the drawdown value for each date. |
|
Aggregates returns by week, month, or year. |
|
Returns a proper grouping function which can then be applied in the series.groupby() or dataframe.groupby(). |
|
Analyses the specified series and finds the top |
|
Finds the values of individual maximum drawdowns and the duration of each drawdown. |
|
Converts logarithmic return to corresponding simple return. |
|
Finds maximal drawdown for the given timeseries of prices. |
|
Helper function to plot simulated paths together with significant lines (like expectation) |
|
Generates random paths. |
|
|
Equivalent of generate_random_paths, but uses log Returns instead |
Converts simple return to the corresponding logarithmic return. |
|
Calculates the SQN = mean return of trade / std(returns of trades). |
|
Calculates the SQN = mean return of trade / std(returns of trades) * sqrt(100) |
|
Calculates average number of trades per year for a given data-frame of trades. |
|
Gets tail events of the benchmark and corresponding events in the examined timeseries. |
|
Function created to allow using TA-Lib functions with QFSeries. |
|
Calculates a volatility for the given series of returns or prices. |
|
Calculates annualised volatility from intraday samples of given interval. |
|
Calculates the rolling volatility for the given series of returns. |