box spread utility for interactive brokers
Project description
ibkrbox
Constructs a Box Spread combo order for SPX or ES futures option, only required arguments are amount you want to lend or borrow , and for how many months.
This utility will automatically look up current treasury rates, and add .30 to get the yield rate. This will be used to calculate limit price. rate or limit price can be overridden as needed.
It can also automatically calculate the right strikes and spread, with approximate expiry for given duration. All of these can be overridden as needed.
This utility is easy to install and use with existing IBKR TWS or gateway session. Just make sure to enable API access in the GUI of IBKR TWS or gateway.
Please file a issue if you notice any problem(s).
Installation
pip install ibkrbox
Usage
ibkrbox -h
1. construct a combo SPX Box Spread lending for 50K, duration 4 months (use "--execute" option to send the order to IBKR)
This will not execute the order, so you can safely run this.
ibkrbox -a 50000 -m 4
2. same as above but using Options on ES Futures (use "--execute" option to send the order to IBKR)
This will not execute the order, so you can safely run this.
ibkrbox -a 50000 -m 4 --es
3. construct a combo SPX Box Spread borrowing for 50K, duration 4 months (use "--execute" option to send the order to IBKR)
This will not execute the order, so you can safely run this.
ibkrbox -a 50000 -m 4 --short
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ibkrbox-0.6.0.tar.gz.
File metadata
- Download URL: ibkrbox-0.6.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.2 Linux/5.10.0-20-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6222489660b3535d28b56a488ba0cc6b025407a6204beac6f15b2fa85d66322
|
|
| MD5 |
7a462456f9c5b6da70f245486db42d48
|
|
| BLAKE2b-256 |
c102920a6008197c822504d13460ba5e5a146d63f6cf9a1b4170a7223b5125be
|
File details
Details for the file ibkrbox-0.6.0-py3-none-any.whl.
File metadata
- Download URL: ibkrbox-0.6.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.2 Linux/5.10.0-20-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d40f307b00f9735309b30cd3025e0598fe505b5bde4243d90162d99b3682befd
|
|
| MD5 |
70a3b24c235bb2eb4a2b02e9bb5ad2ca
|
|
| BLAKE2b-256 |
da5e8f2828d2c159398f36c37c71e39bab314416bee3996b6e09a85436acaa7e
|