ronaldlam / Autotrageur

Automated arbitrageur
2 stars 1 forks source link

Arbitrage: Refactor out Algorithm/Strategy component (6 days) #158

Closed jaonewguy closed 6 years ago

jaonewguy commented 6 years ago

This is one of the two major refactoring tasks for splitting fcf and cc

https://docs.google.com/document/d/12xzC7XsQ0DfqfwwSRtlOgsTSGZM-TY2IvwbToripTuI/edit

Edit (8/12/2018): As part of the refactor, we should be targetting large functions with large test cases such as prepare_trade to see how we can better separate function behaviours and easily test them.

We can make some child tasks for this.

Edit (8/23/2018):

- _poll_opportunity
    - __calc_targets
    - __is_trade_opportunity
        - __evaluate_to_e1_trade
            - __advance_target_index
            - __prepare_trade
        - __evaluate_to_e2_trade
            - __advance_target_index
            - __prepare_trade
    - __check_within_limits
    - __update_trade_targets
        - __calc_targets

- _execute_trade
    - __update_trade_targets
        - __calc_targets
    - __persist_trade_data
    - _send_email