From 76a2344b4a6bebccc15002885f3baae86ea7b905 Mon Sep 17 00:00:00 2001 From: Sankalp Gilda Date: Sat, 28 Jun 2025 19:36:51 -0400 Subject: [PATCH] docs: add refactoring plan for extracting complex methods (#182) --- refactoring-plan-182.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 refactoring-plan-182.md diff --git a/refactoring-plan-182.md b/refactoring-plan-182.md new file mode 100644 index 00000000..f5d54d78 --- /dev/null +++ b/refactoring-plan-182.md @@ -0,0 +1,18 @@ +# Refactoring Plan for Issue #182: Extract Complex Methods + +## Overview +This PR addresses the complexity in `TimeSeriesModel.fit_arch` method by extracting it into smaller, focused methods. + +## Changes to be implemented: +1. Extract GARCH model creation into `_create_garch_model()` +2. Extract EGARCH model creation into `_create_egarch_model()` +3. Extract TGARCH model creation into `_create_tgarch_model()` +4. Extract common parameter validation into `_validate_arch_params()` + +## Files affected: +- `src/tsbootstrap/time_series_model.py` + +## Testing plan: +- Ensure all existing tests pass +- Add unit tests for each extracted method +- Verify model creation behavior remains unchanged \ No newline at end of file