Overview
Theprojection module provides utilities for projecting trends in time series data using linear regression. This is useful for forecasting values based on historical patterns.
project_trend()
Parameters
Array of observed time series values in chronological order
The array index representing the time period for which you want to predict a value
Returns
The predicted value at the specified time index based on linear trend
How It Works
The function:- Checks if there are at least 2 data points (required for trend calculation)
- If fewer than 2 points, returns the first value (no trend can be calculated)
- Fits an Ordinary Least Squares (OLS) linear regression model
- Uses the fitted model to predict the value at the requested time index
Example Usage
Simple Projection
Market Trend Analysis
Insufficient Data Handling
Use Cases
Valuation date adjustment
Valuation date adjustment
Project market values forward to the assessment’s valuation date when sales data is older than the valuation date.
Market trend analysis
Market trend analysis
Analyze and forecast market trends for budget planning and assessment ratio studies.
Time normalization
Time normalization
Normalize historical sales to a common time period for apples-to-apples comparisons.
Gap filling
Gap filling
Estimate missing values in sparse time series data.
This function uses simple linear regression and assumes a constant trend. For more complex patterns, consider using the time adjustment module which supports multiple time trend models.
Limitations
- Linear assumption: Assumes a linear trend, which may not hold for volatile or cyclical markets
- No seasonality: Does not account for seasonal patterns in real estate markets
- Extrapolation risk: Projections far beyond the observed data may be unreliable
- Minimum data: Requires at least 2 observations to calculate a trend
Related
Time Adjustment
Advanced time adjustment with multiple models
Ratio Studies
Calculate assessment quality metrics