Skip to main content

This is a statisical portfolio analysis tool built to facilitate quantitative systems at The Equate Fund - UofT

Project description

Financial Analysis Tools

This package provides a comprehensive set of tools for financial analysis and portfolio management. It includes various metrics, ratios, and models commonly used in quantitative finance.

Features

  • Performance Metrics

    • Adjusted Sharpe Ratio
    • Annual Return
    • Average Return
    • Calmar Ratio
    • Double Sharpe Ratio
    • Modified Sharpe Ratio
    • Sharpe Ratio
    • Sortino Ratio
    • Treynor Ratio
  • Risk Measures

    • Conditional Value at Risk (CVaR)
    • Value at Risk (VaR)
    • Portfolio Volatility
  • Market Models

    • Capital Asset Pricing Model (CAPM)
    • Fama-French Three-Factor Model
  • Technical Indicators

    • Relative Strength Index (RSI)
    • Momentum
  • Portfolio Analysis

    • Benchmarking
    • Correlation with Index
    • Intraweek Variances
    • Market Alpha
    • Market Beta
  • Backtesting

    • SeffyBacktest: A custom backtesting framework

Usage

Every file in /modules is an indicator that can be used alone except for:

benchmarking.py -> A program that allows you to compare your portfolio to various different indexes at the same time. It is currently configured to 5 indexes to chose from and 4 indicators as standard. This is not used in seffybacktest.py

get_portfolio_returns.py -> This allows you to pass in the tickers, weights, start_date and end_date of your portfolio, if you do not have a csv file already prepared. The output of this can be direclty passed in to the seffybacktest from seffybacktest.py to perform whatever analysis you desire.

seffybacktest.py ->The seffybacktest.py script is a comprehensive portfolio analysis tool that offers a user-friendly interface for evaluating investment strategies. It integrates various financial indicators and metrics, including Sharpe ratio, CAPM, Fama-French factors, and momentum analysis, allowing users to select specific indicators for their portfolio evaluation. The script utilizes popular Python libraries such as yfinance for data retrieval, matplotlib for visualization, and tkinter for creating an interactive GUI. It provides flexibility in input parameters, such as risk-free rates and market indices, and offers options for annualizing volatility and plotting momentum and RSI graphs. The tool calculates selected indicators, displays results in a clear tabular format, and generates visual representations when applicable. With its modular design and extensive range of financial metrics, seffybacktest.py serves as a valuable resource for investors and financial analysts seeking to conduct thorough portfolio performance assessments.

Dependencies

python = "^3.12" numpy = "^2.0.0" pandas = "^2.2.2" scipy = "^1.14.0" yfinance = "^0.2.40" DateTime = "^5.5" sklearn = "^0.0.post12" matplotlib = "^3.9.1"

License

MIT Lisence

Disclaimer

These tools are for educational and research purposes only. Always consult with a qualified financial advisor before making investment decisions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seffybacktest-1.2.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seffybacktest-1.2.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file seffybacktest-1.2.1.tar.gz.

File metadata

  • Download URL: seffybacktest-1.2.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for seffybacktest-1.2.1.tar.gz
Algorithm Hash digest
SHA256 b781f10d23e3fbecdb38c048bfc6eea5223d000bdb5cc466211ae632213b3c25
MD5 1174a739b6ad9dae72a0d4b877dada3e
BLAKE2b-256 751fd5e1c4452f69ba2ee941b168271d6e388156758a396eba70b731a25fc4d3

See more details on using hashes here.

File details

Details for the file seffybacktest-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: seffybacktest-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for seffybacktest-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 858c91cc8f385154e845173d0c13e927abd3257963679b8173527395a5afae75
MD5 a2d1460a554ecdad8cf1b8ccf7a7c90f
BLAKE2b-256 cec6bed864fc732ed2d402abca37ddda944bd3c90cd2969fd87be5050d7cb64f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page