The arch pack catches removed arch 9.0 APIs, ignored or invalid options, unscaled returns that break volatility fits, and unseeded bootstraps on files that import arch. Rules fire only on calls bound to arch imports and literal arguments.
| Rules |
Safe fix |
Unsafe fix |
Manual fix |
| 13 |
1 |
6 |
6 |
| Rule |
Severity |
Fix |
What it finds |
| removed-in-arch |
error |
unsafe |
arch 8.0 or 9.0 removed this form, so the import or the call raises. |
| Rule |
Severity |
Fix |
What it finds |
| arch-unknown-option |
error |
unsafe |
This text is not one of the values the option takes, so arch raises ValueError. |
| arch-ignored-argument |
warning |
none |
arch accepts this argument and never reads it for the model or test you asked for, so it has no effect. |
| arch-rejected-number |
error |
unsafe |
arch refuses this number, such as a float where it counts something, so the call raises. |
| Rule |
Severity |
Fix |
What it finds |
| unscaled-returns |
warning |
none |
Returns given as decimals make the arch optimizer struggle, so it warns and can stop with poor estimates. |
| rescaled-units |
warning |
none |
rescale=True lets arch multiply the data, so the volatility, forecasts and parameters come back in rescaled units. |
| Rule |
Severity |
Fix |
What it finds |
| analytic-forecast-horizon |
error |
none |
This model has no analytic forecast beyond one step, so forecast with a longer horizon raises ValueError. |
| forecast-per-origin |
warning |
none |
Calling forecast once for each origin in a loop makes one call where one would do. |
| reindex-is-default |
info |
safe |
reindex=False has been the default of forecast since arch 6.2, so the argument does nothing. |
| fit-output-in-loop |
info |
unsafe |
fit prints every iteration and a summary on each call, so a loop of fits floods the output. |
| Rule |
Severity |
Fix |
What it finds |
| arch-unseeded-draws |
info |
unsafe |
This call draws random numbers from a new seed on every run, and np.random.seed does not reach it, so results change from run to run. |
| results-before-compute |
error |
none |
These results of SPA, StepM, MCS and RealityCheck exist only after compute, so reading them first raises RuntimeError. |
| opt-bandwidth-as-bandwidth |
warning |
unsafe |
Since arch 9.0, these estimators use opt_bandwidth minus 1 as their bandwidth, so passing opt_bandwidth back gives another estimate. |