Skip to content

Conversation

@navdeep-G
Copy link
Owner

  • Implement WeightedMovingAverage class with linear weight distribution
  • Add comprehensive unit tests covering edge cases and mathematical correctness
  • Support configurable period with validation for positive integers
  • Return null values for insufficient data points (period-1 elements)
  • Include sliding window functionality with proper weight calculations
  • Test coverage includes: constructor validation, edge cases, precision,
    trend following, reset functionality, and mathematical accuracy

The WMA assigns higher weights to more recent values, providing better trend responsiveness compared to Simple Moving Average while maintaining smoothing properties. Useful for financial analysis, inventory forecasting, and time series trend detection.

@navdeep-G navdeep-G merged commit 3b619a5 into master Jul 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants