ThetaGang is an IBKR bot for collecting money
AGPL-3.0 License
Bot releases are hidden (Show)
Bump version for next release.
Round to 5 decimal places when checking weights sum.
Bump to stable openjdk.
Fix delta validation, add request errors
If thetagang gets a timeout from ib_insync when fetching portfolio
positions, it proceeds as if nothing happened. It loads the config
file, but without knowing the portfolio positions, it starts to
write puts instead of writing/rolling calls.
I also removed unused imports from the files I touched.
Bump dependencies.
Revert "Bump to stable openjdk."
This reverts commit a34eb483e6b4d5710d2329e052b75a90c33d2efb.
Derp, 11 is the LTS.
Drop Docker armv7 builds.
I'm dropping the Docker builds for armv7 because it's too much trouble
to maintain. If someone wants to figure out how to make it reliable, I'd
welcome their contributions.
Make 'RaiseRequestErrors' optional.
Add UseSSL=true
setting to jts.ini.
This should resolve the issue described at
https://github.com/IbcAlpha/IBC/issues/133 if you bump into it.
Try another jts.ini path.
Try another jts.ini path.
Bump version.
In the event submission fails, report and continue.
When trying to write new puts, allow failure so we can continue.
Ignore positions where avgcost or position count is zero.
Fix quotes w/ installer.
Drop chmod.
Bump dependencies, TWS version.
Upgrade to current IBC, 3.8.7.
Use the default port of 7497.
dos2unix.
Bump jdk version.
Bump jdk to latest.
Try this a slightly different way (to fix jfx).
Use the uberjar instead.
Add the jar.
Add this other jar (what does it do? no one knows).
Fix cache keys.
Use jdk 11, openjfx.
Improve chain scanning.
Remove these.
Use the greater of the model price, or midpoint.
Remove uninstall file as it messes things up.
Update README.md
Using snapshot data doesn't work, suppress illegal access warnings.
Refactor contracts/tickers so it's less confusing.
Improve order submission handling.
Whitelist javax access.
Remove extraneous G.
Whitelist this package too.
Fix package name.
Whitelist another.
Refactor waiting/timeouts.
Derp, this doesn't work in python.
Remove print statement.
Filter out tickers missing prices.
Fallback to model price if needed.
Published by brndnmtthws over 3 years ago
This release allows one to specify a primary exchange, for example when you want to wheel stocks instead of ETFs.
For example, in thetagang.toml
to wheel BRK.B:
[symbols."BRK.B"]
# For symbols that require an exchange, which is typically any company stock,
# you must specify the primary exchange.
primary_exchange = "NYSE"
weight = 0.1
Bump version.
Smart market and avg price for positions.
Update tws hash.
Add comment about TWS version.
Auto-pad position columns.
Improve position output a little more.
Improve formatting, but more!!
Add sweet gif.
Include thousands separator for greater readability.
Drop uneeded decimal places.
Rearrange account values, include decimal w/ cushion.
For options, need to div by multiplier for avg price.
Fix calculation of buying power.
This doesn't need to include other positions, as net liquidity already
accounts for those.
Bump version.
Tidy up log message.
Add FAQ and a few known errors.
Update README.md
Add config log message about rolling ITM.
Fix raising exception.
Exclude current exp when rolling.
Increase timeout when waiting on data 3->5s.
Increase number of iterations from 10 to 25 when waiting on orders/data.
Improve handling of waiting on data, fail gracefully.
Bump version.
Update README.md
Allow delta to be specified per right or symbol.
You can now set target.puts/calls.delta
or symbol.S.delta
to alter
delta on a per-symbol or contract type basis.
Also allow separate delta per-symbol.
When writing calls, strike should be >= avgCost.
Use python3 -m pip command.
Simply default config value handling.
Also fixed default value for min_pnl.
Clarify percent vs ratio.
Handle case of empty list.
Bump version to 0.1.13.
Update readme.
Change default ibc logfile path.
Add maximum_new_contracts
config parameter.
When operating in some accounts, you may encounter situations where
many options are written for the same strikes/symbols/expiries. This
might have the undesirable effect of creating too much exposure at a
particular price/expiry.
One simple solution is to allow an option to simply cap the number of
new contracts written at any given time. With this, ThetaGang should
normally spread the contracts out provided you are running ThetaGang at
regular intervals (i.e., daily or weekly).
Additionally, I tidied up/changed formatting of the toml files.
Fix slightly confusing config log statement.
Remove -t from docker commands.
Refactor Docker build, support multi-arch.
This should resolve #172.
Fix buildx setup.
Use util.isNan() here.
Drop armv7 due to openjdk issues.
Rearrange docker build steps for caching.
Fix build cache handling.
Update config java path to work with Docker by default.
Remove extraneous text.
Add missing qemu step for buildx.
Can't use --load w/ buildx and multi-arch.
Switch base image version.
Add back armv7.
Add dev libraries back for docker build.
Raise exception on timeout waiting for data.
Filter out tickers that are missing prices.
Refactor dockerfile.
Refactor dockerfile a little more.
Allow more time when waiting on data.
When rolling near expiration, allow one to set a minimum P&L.
Print DTE for positions.
Better logger, more config comments.
Fix buildx cache arg.
Rearrange dockerfile, add to dockerignore.
Cache the TWS installer step.
Update ignore files, rearrange dockerfile slightly.
Add python 3.7 support, use debian for docker images.
Remove pandas dep.
Simplify docker build, make wheel outside docker.
Install CA certs.
Add wheel package.
Cache poetry.
Fix cache name.
Add cache ID.
Fix python version.
Fix file permissions.
Cache all of cache dir.
Update README.md
Update README.md
Update README.md.
Sort positions by DTE before printing.
Bump version.
Add sweet meme thanks reddit.
Wait for market prices after fetching tickers.
Also bump python dependencies.
Prefer midpoint rather than market price for orders.
Update TWS hash.
Use docker build cache from dockerhub.
Include build cache info in Docker image.
Show cost rather than avg cost (avg cost * qty).
Make sure buildkit is enabled.
Update COPYING
Update workflow names.
Update README.md
Update TWS hash.
Fix hanging when market data unavailable.
Set a limit when waiting on market data, rather than waiting
indefinitely. We prefer the midpoint price rather than market price, but
fall back to using the market price if midpoint isn't available.
Use buildx setup action.
Put buildkit var back in.
Bump version.
Change paper account # in sample.
Add a few more notes/details to config and code.
Run poetry update.
Allow config of rolling behaviour when ITM.
Use stable TWS (978), remove version config option.
For the sake of keeping everything simple, I've removed the twsVersion
config param in favour of hard coding the version to the latest stable.
If you have the value in your config, it will be ignored.
Clarify buying power calculation, remove min().
Bump version.
Wait for order status to leave pending state.
Config: replace minimum_cushion
with margin_usage
.
I found the concept of maintaining a minimum cushion to be too hard to
reason about, and it didn't properly reflect margin usage in a way that
made sense to me.
Thus, I've replaced it with margin_usage
, which allows you to specify
how much margin to use as a factor of the net liquidation value. I find
this to be much better.
Update thetagang.toml
Bump version.
Fixed readme typo.
This resolves #1.
Add note about symbols/weights.
Add more detail to readme.
Always stop main loop, fix position roll count.
Fix open interest check, improve logging.
Optimize Dockerfile.
Improve config validation.
Raise an error when the weights don't sum to 1 or there are no symbols
defined.
Improve log messages.
Bump version.
Update README.md
Update README.md
Update README.md
Use separate docker hub/github docker workflows.
Add slightly more detail to README.md.
Update sample config.
Add COPYING.
Add sample ibc-config.ini.
Add note about using a paper account to README.
Add shutdown message.
Add basic config validation.