Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions refactoring-plan-182.md
Original file line number Diff line number Diff line change
@@ -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