Took me to go from hmm you know what would be cool?
If i could capture the topic I'm talking about with Claude into a set of Anki flashcards. And push to a deck of my choosing.
15 minutes later, done.
1
2
424
Anyways, something that made life easier - instead of passing TXs around, I pass TX builders around.
I build at the very last moment before sending.
Means I can resolve ALTs either from memory or the network - depending if the builder is latency sensitive.
I can also compose builders that accept multiple builders as long as it implements the same trait. Super handy if I need to append a tip to instructions for a given TX for e.g.
I also wrapped in an enum to avoid dynamic dispatch.
6
1,138
These EngineEvents are then fed into a generic strategy.
The generic strategy can receive two structures:
- EngineEvents
- Ticks
From both of these structures, we derive a Decision. This defines exactly ~what~ the engine should do, if anything.
So, we've reduce a transaction, to a set of instructions, to a set of EngineEvents and finally to a set of Decision.
1
3
434
Each parser is defined for a particular program, or combined set of programs.
It takes an input of a transaction and returns an EngineEvent. Which defines how the engine should run tick by tick. We can think of the backtest framework as a modified engine.
1
3
378
It made sense to invest a little bit of time to make the backtest framework generic over the strategy and parsers specific for a given instruction
Ideally, I want to rerun the backtest across the same slot range for various parameterized strategies - typically we've done grid search to find the best parameter sets.
This arrives at this initial design (still rough around the edges)
3
26
2,005










