Hello, welcome to tradingalgorithm, a Python package for easy algorithmic trading on Alpaca
This package allows one to check account status, make long orders, make short orders, run a custom momentum-based algorithm, and automatically calculate the best tickers to trade in the S&P500 based off of probability of returns and betas.
To run this package, you will need an IEX Finance key, as well as an Alpaca API key
To install the algorithm:
$ pip install tradingalgorithm
To pick a stock ticker:
import tradingalgorithm
ticker = tradingalgorithm.tickerpicker()
To create a stock class:
import tradingalgorithm
ticker = 'AAPL'
aapl = tradingalgorithm.stock(alpacaKey, alpacaSecretKey, iexKey, ticker)
Methods in the class:
aapl.position()
# output: Number of shares:
# Market Value:
# Profit/Loss:
aapl.checkhours()
# output: The market is (open or close)
Returns maximum amount of shares that you can trade of the ticker based on market value of cash portfolio
aapl.max_shares()
Takes AAPL (or chosen ticker) long at the current market price and specified share amount
aapl.longmarket(shares)
Takes AAPL (or chosen ticker) long at the current close of the stock
aapl.longlimit(shares)
Takes AAPL (or chosen ticker) short at the current market price
aapl.short(shares)
Closes entire short or long position in AAPL (or chosen ticker) based on whether you specify "long" or "short" as the typetoclose
aapl.closeposition(typetoclose)
Runs a momentum algorithm ONE TIME based on volume and time&sales, will take a stock short, long, close position, re-position, and employs a custom stop-loss
aapl.algo()
Runs the same momentum algorithm CONTINUOUSLY for the set amount of minutes
aapl.trade(minutes)
Metadata
Release files for TradingAlgorithm-noahxl10 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| TradingAlgorithm-noahxl10-0.0.2.tar.gz | 2.2 kB | Without provenance | Details for TradingAlgorithm-noahxl10-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| TradingAlgorithm_noahxl10-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for TradingAlgorithm_noahxl10-0.0.2-py3-none-any.whl |
Total release size: 4.3 kB
Release files / TradingAlgorithm-noahxl10-0.0.2.tar.gz
| Download URL | TradingAlgorithm-noahxl10-0.0.2.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d079b161817b10a747686c7b63b063057d76153be3578c99d38879a4e9ef143
|
|
BLAKE2b-256 checksum How to use checksums |
d05745a43faf6126edc94a8a1cfd5e74f7e5dbd1f3d9ad0e2bf263d546ba183f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4
|
Release files / TradingAlgorithm_noahxl10-0.0.2-py3-none-any.whl
| Download URL | TradingAlgorithm_noahxl10-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08bf92afff2c5a73cf03be6400069561c6d22387b2ca6dc899811eb61964cdce
|
|
BLAKE2b-256 checksum How to use checksums |
11dda7f984c14b2d6de62d3f990f889884e25cec7833a4eebf711d48202763cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4
|
Security for TradingAlgorithm-noahxl10 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.