Code a function that accepts 2 inputs (live trade list, strategy trade list) and:
- Cleans the data by matching the live fills with the strategy fills.
1a. To match fills compare the Date/Times, Type, and Symbol (cleaned) columns between the live trade dataframe and back test dataframe. The rows with the lowest absolute delta between Date/Times with matching Type and Symbol columns will be the matching row (minus some outlier cases which should be printed to log like cases where theres multiple rows with the same abs delta)
2. Calculates the delta between the strategy fills and actual fills and converts it to big point values
2a. This is the easy part, you're just calculating the difference between Price columns in the 2 dataframes.