Sign inSign up

agna/catalyst

By agna

•Updated about 9 years ago

Container for Engima Calalyst hedge-fund strategy tester - currently in Alpha

Image
0

274

agna/catalyst repository overview

⁠Enigma - Catalyst

Docker image for testing strategies against the Enigma Catalyst Alpha engine

⁠Prerequisite: Add Viewer to Host Machine

Additional setup is required to display GUI from container to host computer.

⁠Mac Setup
  1. Download & Install XQuartz⁠
  • Install Socat & Cask using brew

    • brew update
    • brew install socat cask
  • Reboot Computer

  • Verify DISPLAY variable set

    • echo $DISPLAY
  • Start XQuartz & Socat

    • open -a XQuartz
    • socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
⁠Windows Setup
  1. Download & Install Xming⁠
  • Opening Xlaunch
  • cd %ProgramFiles(x86)%/Xming
  • Xming.exe :0 -multiwindow -clipboard -ac
⁠Running the Docker Image
  1. Pulling down the image

    • docker pull agna/catalyst
  2. Get IP address of Docker host (ex. 192.168.0.13)

    • Windows: ipconfig
    • Mac: ifconfig

Starting up a container * docker run -it --name catalyst -e DISPLAY=[HOSTIP]:0 agna/catalyst (ex.) docker run -it --name catalyst -e DISPLAY=192.168.0.13:0 agna/catalyst

⁠Using the running container

Running an included example strategy

container# catalyst run -f /examples/buy_and_hodl.py -s 2016-5-5 -e 2017-7-7 -o hodl.pickle

You can quickly test using a 2 year date range by using the following: $test path/to/strategy.py

container#$test /examples/buy_and_hodl.py container#$test /examples/dual_vwap.py

⁠Adding custom strategies to container

Add a volume to the path of the strategies on your host machine. Below is an example assuming the path is ~/catalyst/strategies creating a folder named strategies in the container.

  • docker run -it --name catalyst -e DISPLAY=[HOSTIP]:0 -v ~/catalyst/strategies:/strategies agna/catalyst

Now you can run your custom strategies in the running container

container# catalyst run -f /strategies/custom.py -s 2016-5-5 -e 2017-8-18 -o custom.pickle or container# $test /strategies/custom.py

Tag summary

Content type

Image

Digest

Size

519.4 MB

Last updated

about 9 years ago

docker pull agna/catalyst