Giter Club home page Giter Club logo

Comments (21)

brndnmtthws avatar brndnmtthws commented on May 27, 2024 1

The newest image hasn't been published yet, you'll have to wait a while for it to finish.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

Currently only amd64 is supported, not ARM.

In theory you should be able to get it working on ARM, given it's just a Java app, but I haven't tried.

If you want to try it yourself, you can build the Docker image locally (on your rasppi) and see if it works. Most likely it will fail, because we're currently using the bundled JVM instead of installing OpenJDK 8.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

Digging a little more into it, they do some really weird stuff in the TWS installer. Not only do they try and force a specific version of the JVM, but they also pin it to amd64. I think it can be overridden, but it requires modifying the installer. or bypassing it altogether.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

Honestly, this whole installer is a massive dumpster fire. One option is to extract the files and copy the jars out manually from an amd64 machine.

I hope IBKR hires some engineers who know what they're doing some day.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

Okay, after a lot of futzing about I think I have something that works with 08e20bd. Assuming the Docker build succeeds, you can try the latest now on your rasppi.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

wow thank you so much man
also yea its like they dont want the little people to make money.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

also yea its like they dont want the little people to make money.

The name of the game is to get the money out of your pocket and into theirs.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

Also boss, can I try this again on Ubuntu mate? I know the error has to do with the pi's processor. The docker build was successful on raspberry picks until the processor error came up. Is there any way to recompile the code using a compiler for the pi? I can figure it out just like I sort of did with this project. Or should I keep trying with pi os?

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

The image is available for arm now, do a docker pull brndnmtthws/thetagang:latest and it'll work.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

pi@delos:~/thetagang $ docker run --rm -i -v ~/thetagang:/etc/thetagang brndnmtthws/theta
gang:latest --config /etc/thetagang/thetagang.toml
Unable to find image 'brndnmtthws/thetagang:latest' locally
latest: Pulling from brndnmtthws/thetagang
docker: no matching manifest for linux/arm/v7 in the manifest list entries.
See 'docker run --help'.

Running on Raspberry Pi OS

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

I didn't realize Pi OS was still 32 bit. I had a really tough time getting the armv7 OpenJDK working properly so I dropped it. Let my try something else.

Pi OS does have a aarch64 release, but it says they don't recommend using it for some reason.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

It may be on the raspberry pi os? Yea i have an older pie that i put together with a GPIO fan and heat syncs. I want to have it run 247 with my IBKR stuff. You are a boss Brendan. Thank you very much. If you cant get it to work, ill try this raspberry image you suggested.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

Here you go:

Screen Shot 2021-02-05 at 2 34 38 PM

Should work on both 32/64 bit arm.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

YAAAY!!! thank you!!!

I compiled everything on my pi and it was working. I keep getting this error call in the sync log.

2021-02-05 18:48:31,034 ib_insync.client ERROR API connection failed: ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 4002)")
2021-02-05 18:48:31,034 ib_insync.client ERROR Make sure API port on TWS/IBG is open

Ill try updating my systems copy to the image you just published. See if that corrects the error. Thank you so much again boss, this has been such a huge eye opener. Ive learned a decent amount about coding thanks to this project.

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

2021-02-05 18:48:31,034 ib_insync.client ERROR API connection failed: ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 4002)")
2021-02-05 18:48:31,034 ib_insync.client ERROR Make sure API port on TWS/IBG is open

There could be a lot of things causing this. Most likely, for some reason, TWS is not launching properly. I've tested on aarch64, and it does work, but I don't have an armhf machine to test with right now.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

I used raspberry pi os.
Maybe try with Ubuntu mate?

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

I installed the new docker image and tried to run it. Noticed you added a minimum pnl variable. How do i set it to 50%? 0.5?

New error

Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/schema.py", line 394, in validate
nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/schema.py", line 415, in validate
raise SchemaWrongKeyError(message, e)
schema.SchemaWrongKeyError: Wrong key 'min_pnl' in {'pnl': 0.9, 'dte': 15, 'min_pnl': 50, 'calls': {'itm': True}, 'puts': {'itm': False}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/src/thetagang/main.py", line 35, in cli
start(config)
File "/src/thetagang/thetagang.py", line 33, in start
validate_config(config)
File "/src/thetagang/config.py", line 98, in validate_config
schema.validate(config)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/schema.py", line 398, in validate
raise SchemaError([message] + x.autos, [e] + x.errors)
schema.SchemaError: Key 'roll_when' error:
Wrong key 'min_pnl' in {'pnl': 0.9, 'dte': 15, 'min_pnl': 50, 'calls': {'itm': True}, 'puts': {'itm': False}}

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

It should be a float. 1.0 is 100%, 0 is 0%, 0.5 is 50%. I meant to make that value optional, that was a mistake.

I might change the behaviour of that too. I'm worried about the case where you sell covered calls, and they end up deep ITM. Currently my preference is to roll them, but that may result in margin getting eaten up if they're grossly mispriced. If the P&L is something like -100%, you'd have to set that value to -1 for them to be rolled.

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

I had tried to put 1.0 in and its still returning errors.

Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/schema.py", line 394, in validate
nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/schema.py", line 415, in validate
raise SchemaWrongKeyError(message, e)
schema.SchemaWrongKeyError: Wrong key 'min_pnl' in {'pnl': 0.9, 'dte': 15, 'min_pnl': -1.0, 'calls': {'itm': True}, 'puts': {'itm': False}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/src/thetagang/main.py", line 35, in cli
start(config)
File "/src/thetagang/thetagang.py", line 33, in start
validate_config(config)
File "/src/thetagang/config.py", line 98, in validate_config
schema.validate(config)
File "/root/.cache/pypoetry/virtualenvs/thetagang-VsnhxLU2-py3.8/lib/python3.8/site-packages/schema.py", line 398, in validate
raise SchemaError([message] + x.autos, [e] + x.errors)
schema.SchemaError: Key 'roll_when' error:
Wrong key 'min_pnl' in {'pnl': 0.9, 'dte': 15, 'min_pnl': -1.0, 'calls': {'itm': True}, 'puts': {'itm': False}}

from thetagang.

Ianfinn1994 avatar Ianfinn1994 commented on May 27, 2024

How goes the new image, boss?

from thetagang.

brndnmtthws avatar brndnmtthws commented on May 27, 2024

The image is available, and it should work on both armv7 and aarch64/armv8.

from thetagang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.