Financial Forecasting Python Library

https://github.com/reckoning-machines/financial-forecasting/

Work in progress –

A library of objects to manage financial data such as prices, exogenous and market, ratios, and betas.

Initially pulling data from Financial Modeling Prep and the St Louis FRED APIs (links below).

In financial forecasting, everything begins with a canonical calendar, which should contain fiscal quarter, calendar quarter, quarter end date, earnings report date, and earnings report trading date (based on whether the earnings results come out before the market opens [bmo] or after the market closes [amc].

All other datasets used for machine learning then can work as rolling ‘left’ joins with the canonical calendar acting like a binder to an expanding book.

To do:

  1. Forecast earnings vs the Street

2. establish daily returns as the ‘target’ for the machine learning module.

3. Rolling join (using functools) module to create the final ML dataset.

4. ML modeling, output, and daily roll foward backtest.

https://site.financialmodelingprep.com/developer/docs

https://fred.stlouisfed.org