-
Notifications
You must be signed in to change notification settings - Fork 260
Custom strategies could be more complex if UpdateWithOps was strategy specific #59
Comments
@Reidmcc I think that most (if not all) strategies can be coded using a level provider. |
An example would be if you wanted to implement criteria in Using |
After working on #60 I now know that the level providers can store data across cycles, which would allow the examples I gave above to be done in the level provider. The remaining case for this issue's suggestion is for customized strategies that use a completely different concept than a strategy that wants to replace offers that were filled. If you weren't doing market making that could well be the case. Metrics based swing trading would be an example. That may be out-of-scope for Kelp if it's intended to always be a market maker. |
I'm going to go ahead and close this. If a user requests something that requires this we can keep it in mind. |
Desired Behavior
I would like to be able to customize more of Kelp's logic than what is currently possible. Currently custom strategy logic is confined mostly to the level providers. However, strategic logic also resides in parts of sellSideStrategy, namely
UpdateWithOps
andmodifySellLevel
. Having that logic in a static part of the code limits customization possibilities.Impact
This would enable users to create more complex customized strategies without messing with sellSideStrategy and changing things for all strategies. I think it also makes sense to have functions that contain level-setting logic be part of the strategy code in general.
Feature Suggestion
We could do this by converting
UpdateWithOps
andmodifySellLevel
to work the way level providers do. They would be constructed as part of strategy generationAdditional context
The level providers do allow quite a bit of customization, including the idea I was thinking through when I thought of this, #52. However, the proposed change would enable much more complex logic than that issue.
Specification
We would have the functions in strategy specific files, similar to the files that define level providers. The current static version would be kept for use by strategies that don't need to customize these functions.
The part of the strategy factory methods that generates the
sellSideStrategy
would change to be something like this:A new type would be needed in api/level:
A additional parameter would be added to
sellSideStrategy
andmakeSellSideStrategy
I may well be missing somewhere else a change would be needed. This is obviously a big change, so I'm not going to code it up for a pull request unless approved.
The text was updated successfully, but these errors were encountered: