Buy and Sell signals using VWAP-based trading algorithm
Project description
Welcome to the VWAP package. This package takes as input an Alpha Vantage free API key, which can be found here: https://www.alphavantage.co/support/#api-key, a stock ticker (eg. AAPL, AMZN, TSLA...), and a time interval (1min, 5min, 15min...). The package returns 4 figures:
(1) buy and sell signals figure with stock price and VWAP line (2) Portfolio flow over time (holding, cash, total) (3) ROI for VWAP strategy vs buy and hold (4) Sharpe Ratio for VWAP strategy vs buy and hold
Please note that there is a call limit using a free API (5 calls per minute and 500 calls per day) To run the code, you will first need to install AlphaVantage using the following pip call: pip install alpha_vantage Then, you can run the following lines to get the figures:
from portfolio import run test = run(API_key='YOUR_API_KEY', ticker='TICKER_NAME', interval='5min') full = test.complete()
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 Distribution
Built Distribution
File details
Details for the file VWAP-1.0.4.tar.gz
.
File metadata
- Download URL: VWAP-1.0.4.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198c8f1ba62faf5e4eac942f9f8ac34dd1694409adc0aeef7714216f6883f7a2 |
|
MD5 | a4e5ddfe8ec0bc54563413987b98118a |
|
BLAKE2b-256 | 4589c87768fe8c168e16a6ba2c38d6d0d443d7e39eb1d0898dbdca2cd5c05225 |
File details
Details for the file VWAP-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: VWAP-1.0.4-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71ae2e5ecb6d7ce73b8cd90807d215d07b965f0a9be469545a4eb39935d79335 |
|
MD5 | 98393fc4649ca35b8920f1bdd0fba9ac |
|
BLAKE2b-256 | ee6786c643d9876e9e493ba61ce46685db764a218ccb1db2daed743c59871f9f |