ffn is a library for financial calculations in Python, providing performance analysis, portfolio optimization, and financial charting. Current version 1.1.5 supports Python 3.9+. Maintained, with updates as needed.
pip install ffnNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Quick example: download price data, compute returns, and plot performance.
Install yfinance (pip install yfinance) and use it to fetch data instead of pandas-datareader.
Ensure to select a single price column (e.g., 'Adj Close') before calling to_returns.
Use ffn.set_plot_backend('matplotlib') to restore old behavior, or adapt code to work with plotly figures.pip install pandas-datareader
Select a single column (e.g., df['Adj Close']) before passing to ffn.
Check the data structure; use yfinance with auto_adjust=True or select the correct column (e.g., 'Close').
No dependency data recorded yet.