Feature Engineering for ML¶
Under development
This lesson is part of the course scaffold and is being actively written. The learning objectives and outline below define its final scope.
Learning objectives¶
By the end of this lesson you will be able to:
- Construct candidate features from price, volume, and microstructure data and test each for stationarity before it enters a model
- Implement fixed-horizon and triple-barrier labeling and justify which is appropriate for a given strategy's holding period and exits
- Compute sample weights that correct for overlapping labels and show their effect on model training
- Audit a feature pipeline for leakage — temporal, cross-sectional, and preprocessing-induced — and demonstrate the fix
Outline¶
- Feature sources — prices, volume, and microstructure
- Stationarity of features — tests, transformations, and fractional differencing
- Labeling I — fixed-horizon returns and their pathologies
- Labeling II — the triple-barrier method
- Sample weights — correcting for overlapping labels
- Leakage — how it enters pipelines and how to audit for it
- The leak-free pipeline — the dataset used for the rest of this part