Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

[8] buyTwap strategy #522

Closed
nikhilsaraf opened this issue Oct 8, 2020 · 0 comments · Fixed by #630
Closed

[8] buyTwap strategy #522

nikhilsaraf opened this issue Oct 8, 2020 · 0 comments · Fixed by #630
Assignees
Labels
feature request New feature or request
Milestone

Comments

@nikhilsaraf
Copy link
Contributor

We have a sellTwap strategy, which uses the compose strategy to set the buy side as empty (delete) and sell side as the sell twap level provider.

We want an equivalent strategy that works on the buy side where buy side is set to the sell twap level provider and sell side is empty (delete). In such situations you will need to adjust the ordering of the base asset and quote asset as is done in the buysell strategy.

This should reuse the sample sellTwap config file. If there are any differences when creating the buy version please highlight in comments. If they are exactly the same we can rename the sample config file to sample_twap.cfg indicating that it is common for both buy and sell twap strategies.

Here are two useful resources:

  1. sellTwap strategy file
  2. buysell strategy file
  3. sample sellTwap config file
  4. sample PR on how to create a new trading strategy.

We want to include this in the v1.10.0 release and is a priority over the Kelp GUI rc2.

Testing is a manual process in this case, which is what contributes to 3 of the 5 points allotted to this task

Testing

This should be tested manually on SDEX with a 10-second update interval (trader config) and a 60-second bucket interval (strategy config file).

Please upload the log file here from the test run so I can look at it and ensure the strategy is working correctly (and also for posterity).

Triggering Trades

We want some way of triggering trades against the buyTwap strategy. One way is to create the necessary accounts on SDEX testnet and start consuming the maker orders created by the buytwap manually. You can use the testnet versions of interstellar.exchange or stellarterm for this.

@nikhilsaraf nikhilsaraf added the feature request New feature or request label Oct 8, 2020
@nikhilsaraf nikhilsaraf added this to the v1.10.0 milestone Oct 8, 2020
@nikhilsaraf nikhilsaraf modified the milestones: v1.10.0, v1.10.1 Oct 20, 2020
@debnil debnil changed the title [5] buyTwap strategy [8] buyTwap strategy Oct 26, 2020
debnil added a commit that referenced this issue Dec 1, 2020
* Add hint msg for missing db

* Add buytwap config

* Update db query struct to support buy queries

* Update volumeFilter to allow buy side

* Modify filterFactory and test to allow buy side changes.

* Fix build issues

* Add action to makeFilterVolume

* Address review - nikhilsaraf

* Delete all actions

* Check action.
debnil added a commit that referenced this issue Dec 2, 2020
* Initial commit - implement buy side

* Rename sellBaseAsset fields to baseAsset

* Fix action param

* Clean test build

* Remove buyside impl

* Change some renames

* Align all names with master
nikhilsaraf added a commit that referenced this issue Dec 25, 2020
* Initial commit - from previous PR

* Remove isSelling check

* Modify level price

* update sample_buytwap.cfg after checking diffs with selltwap config

* gitignore logs

* allow FILTERS in trader.cfg to be enabled on buy_twap strategy

* enforce base filters on sell twap level provider

Co-authored-by: Nikhil Saraf <1028334+nikhilsaraf@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request New feature or request
Projects
None yet
2 participants