Error: ../index_files - The system cannot find the path specified.
hypersheets
hypersheets
This file will become your README and also the index of your documentation.
About
This is a python package, made in nbdev for creating financial tearsheets based on quanstats.
Documentation can be found here
Install
pip install hypersheets
How to use
Importing of data
The package provides a wrapper for yfinance’s Yahoo API to allow the downloading of price and return date (based on daily adjusted close)
= hs.utils.download_prices('SPY', period="5y")
SPY_prices = hs.utils.download_returns('SPY', period="5y") SPY_returns
Existing price data data can be easily turned into returns
= hs.utils.download_prices('QQQ', period="5y")
QQQ_prices = hs.utils.prepare_returns(QQQ_prices) QQQ_returns
Analysis
Prebuilt reports functions allow for the quick analysis of stock performance
# hs.reports.plots(SPY_returns, QQQ_returns, display=True)
More detailed html tearsheets can also be produced:
= 'SPY', benchmark_title = 'QQQ', download_filename = 'Example_Tearsheet.html', output = False) hs.reports.html(SPY_returns, QQQ_returns, returns_title
More infomation
A full list of methods can be generated by:
hs.utils.__all__
['mtd',
'qtd',
'ytd',
'pandas_date',
'pandas_current_month',
'multi_shift',
'to_excess_returns',
'prepare_returns',
'to_returns',
'to_prices',
'to_log_returns',
'log_returns',
'exponential_stdev',
'download_prices',
'download_returns',
'prepare_benchmark',
'rebase',
'group_returns',
'aggregate_returns',
'prepare_prices',
'round_to_closest',
'file_stream',
'make_index',
'make_portfolio']