An execution framework for systematic strategies

Related tags

Miscellaneouswagmi
Overview

WAGMI is an execution framework for systematic strategies.

It is very much a work in progress, please don't expect it to work!

Architecture

The Django framework ties this project together and so a basic knowledge of Django is very useful if you want to work on this.

This has no dependencies on GCP or AWS, a DockerFile is provided as a deployment option. There is also a Makefile with some handy commands to get up and running.

Scheduling of tasks uses apscheduler, wrapped in django_apscheduler.

There are two key apps, "sizing" and "execution". Other apps can be added as strategies. The only strategy app included is "yolo", which is a RobotWealth strategy and requires a Robot Wealth API key. See https://robotwealth.com/.

The Sizing app collects Strategy Position Requests from each strategy, and then sizes the resultant trades based on the capital allocated to each strategy. The Sizing app then resolves the combined aggregate Target Positions for each Security.

The Execution app compares the actual account positions on the Exchange to the Target Positions, calculates the delta, and places an order for each Security to bring the actual account positions in line with the Target Positions.

All of this is logged, including fees, arrtival prices and fill prices.

Status

Some of the above works, some is incomplete. I ripped this code out of another project with the view of creatign a combined execution framework that can be used with a number of strategies on a number of different exchanges. For the purpose of simplicity, I have ripped out all of the IB execution code and other strategies (that aren't really for the public domain).

Getting Started

clone the repo create a virtualenv (I recommend pyenv-virtualenv) install the requirements 'pip install -r requirements.txt' make a .env file (based on .env-example) setup a database (connection string and password in the env file) - if you like, you can get a postgres running locally in docker using 'make runpg' then 'make createdb'

check everything is working: ./manage.py migrate (if not - fix any errors) load the fixtures: ./manage.py loaddata exchanges.yaml make a user: ./manage.py createsuperuser run it: ./manage.py runserver go to: https://localhost:8000/wagmi/ and login.

Contributing

Please use create a fork and submit pull requests!

The plan is:

  1. Get this working for RW "yolo" on ftx.
  2. Make sure the blotting is accurate (fills and fees)
  3. Consider optimising execution (it currently just tries to place an aggressive order inthe order book)
  4. Serve as a framework for other strategies.

BSD License

Copyright (c) 2021, Rich Atkinson

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

Owner
Rich Atkinson
CTO at Airteam. Problem solvers in software engineering and UX design. We are a trusted, safe pair of hands for many leading Australian organisations.
Rich Atkinson
Scripts to convert the Ted-MDB corpora into the formats for DISRPT shared task and the converted corpora

Scripts to convert the Ted-MDB corpora into the formats for DISRPT shared task and the converted corpora.

1 Feb 08, 2022
This is a library which aiming to save all my code about cpp. It will help me to code conveniently.

This is a library which aiming to save all my code about cpp. It will help me to code conveniently.

Paul Leo 21 Dec 06, 2021
EloGGs ๐ŸŽฎ is a 1v1.LOL Trophy Boosting Program (PATCHED)

EloGGs ๐ŸŽฎ is an old patched 1v1.LOL boosting program I developed months ago, My team made around $1000 total off of this, but now it's been patched by the developers.

doop 1 Jul 22, 2022
A Non profit app built on top of Frappe framework & ERPNext

Non Profit A Non profit app built on top of Frappe framework & ERPNext. People who change the world need the tools to do it! The Non Profit Modules of

Frappe 16 Nov 17, 2022
a url shortener with fastapi and tortoise-orm

fastapi-tortoise-orm-url-shortener a url shortener with fastapi and tortoise-orm

19 Aug 12, 2022
MinimalGearDisplay, Assetto Corsa app

MinimalGearDisplay MinimalGearDisplay, Assetto Corsa app. Just displays the current gear you are on. Download and Install To use this app, clone or do

1 Jan 10, 2022
Anonfiles files leaker via keyword.

Anonfiles files leaker via keyword

Trac3D1y 6 Nov 23, 2022
This repository collects nice scripts ("plugins") for the SimpleBot bot for DeltaChat.

Having fun with DeltaChat This repository collects nice scripts ("plugins") for the SimpleBot bot for DeltaChat. DeltaChat is a nice e-mail based mess

Valentin Brandner 3 Dec 25, 2021
A Python tool to check ASS subtitles for common mistakes and errors.

A Python tool to check ASS subtitles for common mistakes and errors.

1 Dec 18, 2021
Simple python script for AD enumeration

AutoAD - Simple python script for AD enumeration This tool was created on my spare time to help fellow penetration testers in automating the basic enu

Mohammad Arman 28 Jun 21, 2022
The Playwright Workshop for TAU: The Homecoming

tau-playwright-workshop This repository contains the instructions and example code for the Playwright workshop for TAU: The Homecoming on December 1,

Pandy Knight 134 Dec 30, 2022
An useful scripts for Misskey

misskey-scripts This place storing useful scripts which made by me. icon-repair Repair broken remote user's icon.

CyberRex 5 Sep 09, 2022
๋””ํ…์…˜ ์œ ํ‹ธ ๋ชจ์Œ

Object detection utils ์œ ํ‹ธ๋ชจ์Œ ์„ค๋ช… ๋งํฌ convert convert ๊ด€๋ จ์ฝ”๋“œ https://github.com/AI-infinyx/ob_utils/tree/main/convert crawl ๊ตฌ๊ธ€, ๋„ค์ด๋ฒ„, ๋น™ ๋“ฑ ํฌ๋กค๋ง ๊ด€๋ จ https://gith

codetest 41 Jan 22, 2021
Automatically re-open threads when they get archived, no matter your boost level!

ThreadPersist Automatically re-open threads when they get archived, no matter your boost level! Installation You will need to install poetry to run th

7 Sep 18, 2022
A fancy and practical functional tools

Funcy A collection of fancy functional tools focused on practicality. Inspired by clojure, underscore and my own abstractions. Keep reading to get an

Alexander Schepanovski 2.9k Dec 29, 2022
The little-endian version of MessagePack

MessagePackEL This is the little-endian version of MessagePack, except the endianness is different, the rest is exactly the same as MessagePack. C lib

dukelec 9 May 13, 2022
A Python Based Utility for Processing GST-Return JSON Files to Multiple Formats

GSTR 1/2A Utility by Shan.tk Open Source GSTR 1/GSTR 2A JSON to Excel utility based on Python. Useful for Auditors in Verifying GSTR 1 Return Invoices

Sudharshan TK 1 Oct 08, 2022
jmespath.rs Python binding

rjmespath-py jmespath.rs Python binding.

messense 3 Dec 14, 2022
Step by step development of a vending coffee machine project, including tkinter, sqlite3, simulation, etc.

Step by step development of a vending coffee machine project, including tkinter, sqlite3, simulation, etc.

Nikolaos Avouris 2 Dec 05, 2021
A framework that let's you compose websites in Python with ease!

Perry Perry = A framework that let's you compose websites in Python with ease! Perry works similar to Qt and Flutter, allowing you to create componen

Linkus 13 Oct 09, 2022