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.2.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.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trade_strategy-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 511801b50a5db07d1d3edc50e4768e4418cc746f475cca5852783a9f5699761b
MD5 1f91f1a273bb0abdf580a81f1ec776ce
BLAKE2b-256 6599398f5a4823ce71a7ac479d923335b0dbe72984e4d8b8aa94641a6e453d81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trade_strategy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cafecb8869f7f1a4b1fe221f9fa601e062740e430fed815ecce354b2e27c6cf7
MD5 91161e6de6cbc89a01689deb5af4f663
BLAKE2b-256 efd9984da97a0a71117829c0370256f1fbe9985a2c0c62f706168c593f28a694

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