hypersheets

hypersheets
Error: ../index_files - The system cannot find the path specified.

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)

SPY_prices = hs.utils.download_prices('SPY',  period="5y")
SPY_returns = hs.utils.download_returns('SPY',  period="5y")

Existing price data data can be easily turned into returns

QQQ_prices = hs.utils.download_prices('QQQ',  period="5y")
QQQ_returns = hs.utils.prepare_returns(QQQ_prices)

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:

hs.reports.html(SPY_returns, QQQ_returns, returns_title = 'SPY', benchmark_title = 'QQQ', download_filename = 'Example_Tearsheet.html', output = False)

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']