Upload README.md with huggingface_hub
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192---license: mitlanguage: - entags: - economics - forestry - time-series - regression - timber - oregon - harvest-timingmetrics: - r2 - maemodel-index: - name: Oregon Timber Market Timing results: - task: type: regression dataset: type: oregon-timber-data name: Oregon Timber Stumpage Prices metrics: - type: r2 value: 0.852 name: Walk-Forward R² - type: mae value: 50.0 name: Walk-Forward MAE---
# Oregon Timber Market Timing Model
Predicts Douglas fir stumpage prices ($/MBF) and recommends optimal timing for marketing timber on a 20-acre tract in Oregon, Pacific Northwest.
## How It Works
1. **Ridge regression** with 21 engineered features (price lags, lumber PPI, housing starts, interest rates, CAD/USD, seasonality)2. **Walk-forward validation** on 2015–2024 hold-out data3. **500-sample bootstrap forecast** for 8 quarters ahead with prediction intervals4. **Monte Carlo optimal stopping** (50,000 price path simulations) to decide: sell now or wait
## Performance
| Metric | Score ||--------|-------|| Overall R² (walk-forward) | **0.85** || Mean Absolute Error | **$50/MBF** || Training data | 122 quarters (1993–2024) |
## Key Price Drivers
| Rank | Feature | |Coefficient| ||------|---------|-----------------|| 1 | price_lag1q | 45.8 || 2 | lumber_futures | 26.0 || 3 | lumber_ppi | 25.0 || 4 | Q1 seasonality | 20.4 || 5 | price_lag2q | 20.1 |
## Usage
```pythonimport picklefrom sklearn.pipeline import Pipeline
with open('oregon_timber_model.pkl', 'rb') as f: bundle = pickle.load(f) model = bundle['model'] feature_cols = bundle['feature_cols']
# Prepare features matching bundle['feature_cols'] and predict# price = model.predict(features)[0]```
Full training and inference pipeline available in [`timber_final.py`](./timber_final.py).
## Data Sources (Production)
| Source | Data | Access ||--------|------|--------|| Oregon Dept of Forestry | Quarterly timber sale results | [oregon.gov/ODF](https://oregon.gov/ODF) || FRED (St. Louis Fed) | Housing starts, lumber PPI, mortgage rates | Free API || CME / yfinance | Lumber futures (LBS=F) | Free || Random Lengths | Weekly lumber composite | Paid (~$300/yr) |
**Note:** Training data in this repo is synthetic, calibrated to published USDA PNW stumpage statistics. Replace with actual ODF data for production use.
## Citation
Inspired by Faustmann rotation model (1849), Clarke & Reed real-options timber harvesting (1989), and USDA Pacific Northwest stumpage research (PNW-GTR-423, PNW-RP-436).README.mdAdded+92