Skip to main content

A Python package for analyzing investment portfolios, including using quantitative methods like the efficient frontier for calculations an optimal asset allocation strategy.

Project description

trade_strategy

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install trade-strategy

How to Run

  • Assets: ["AAPL", "MSFT", "GOOG"]
  • Start Date: 2013-01-01
  • End Date: 2025-03-27

Expected Output

The script will output the lowest risk, highest returns, and highest Sharpe ratio allocations for the specified tickers and date range.

Lowest risk Allocation
Returns                    0.248073
Risk                       0.234054
Sharpe Ratio               1.059898
Weights         [0.347, 0.352, 0.3]
Name: 69, dtype: object
['AAPL', 'MSFT', 'GOOG']

Highest Returns Allocation
Returns                      0.268417
Risk                         0.262248
Sharpe Ratio                 1.023524
Weights         [0.003, 0.986, 0.011]
Name: 116, dtype: object
['AAPL', 'MSFT', 'GOOG']

Highest Sharpe Allocation
Returns                      0.258282
Risk                         0.238805
Sharpe Ratio                 1.081562
Weights         [0.301, 0.588, 0.111]
Name: 128, dtype: object
['AAPL', 'MSFT', 'GOOG']

License

trade-strategy is distributed under the terms of the MIT license.

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

trade_strategy-0.1.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

trade_strategy-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file trade_strategy-0.1.1.tar.gz.

File metadata

  • Download URL: trade_strategy-0.1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for trade_strategy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ce49ffba495f2c5e047edf5b6890387699f23eef9fb1b905215140b6d3a4aec3
MD5 2b632ccb309b40d90b7f26d4481a0c07
BLAKE2b-256 b230d99e2e75f6f614e742fca0023f3485be3f4168c5a686db2c098fb6c8683a

See more details on using hashes here.

File details

Details for the file trade_strategy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: trade_strategy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for trade_strategy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3933a752717d39bfc5b041a2fddd2466d7d2ea9890d226eeda729f61033b56d2
MD5 cbf4395eddb7dd136147e0a112a0044b
BLAKE2b-256 2bebff515cd343a5104fb65c99c3b1d8c8d6574addf19a978c1c4db8f368dd3e

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