Expected tail loss portfolio optimisation in python
Project description
etlportfolio
Expected tail loss portfolio optimisation in Python
Description
This package contains portfolio optimisation class structures to perform alternative portfolio optimisation exercises. Included in the package are a mean-variance portfolio object, two common downside risk-oriented portfolio objects (CVaR and the lower partial moment), as well as an 'expected tail loss' (ETL) portfolio object based on the model of Geman et. al. (2015). Through these objects a user can implement downside risk optimised portfolios in a tractable fashion.
Installation
$ pip install etlportfolio
Usage
# import modules
from etlportfolio import data, portfolio
# historical asset return data
tickers = [...]
returns = data.get_prices(tickers, '1W')
# simple historical estimates of returns and VCV, though this
# can be generated from any forecasting process.
forecast_rets = np.mean(returns)
forecast_covs = np.cov(returns, rowvar=False)
# make an instance of class ETLPortfolio
etl = portfolio.ETLPortfolio()
# set risk aversion loss threshold
etl.k = -0.02
# feed in forecast data
etl.load_forecasts(tickers, forecast_rets, forecast_covs)
# get optimal weights
etl.optimise()
etl.weights
Contributing
Pull requests are welcome.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file etlportfolio-2.0.4-cp310-cp310-any.whl.
File metadata
- Download URL: etlportfolio-2.0.4-cp310-cp310-any.whl
- Upload date:
- Size: 138.1 kB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9512ac2c26d9243181e4c69ecd2f64c799bde77a07a73a0c706a6b565ad6c470
|
|
| MD5 |
fc97ac7d53150f943aff3cbfa75ca4f5
|
|
| BLAKE2b-256 |
803e0d52d53037c1c51b7c25dac81e91cdabfa75c383afa132056c89e563ccb7
|
Provenance
The following attestation bundles were made for etlportfolio-2.0.4-cp310-cp310-any.whl:
Publisher:
python-package.yml on jack-tobin/etlportfolio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etlportfolio-2.0.4-cp310-cp310-any.whl -
Subject digest:
9512ac2c26d9243181e4c69ecd2f64c799bde77a07a73a0c706a6b565ad6c470 - Sigstore transparency entry: 146279797
- Sigstore integration time:
-
Permalink:
jack-tobin/etlportfolio@b95fa15ec82905517010245d54bf39a0fed7593a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jack-tobin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@b95fa15ec82905517010245d54bf39a0fed7593a -
Trigger Event:
push
-
Statement type: