TimeSeriesFeatureOptions

Options & Configuration · AiDotNet.Models.Options

Configuration options for time series feature extraction transformers.

Inheritance: ModelOptions → TimeSeriesFeatureOptions

For Beginners

This class is like a settings panel for feature extraction. You can configure:

  • What statistics to calculate (mean, std, etc.)
  • How large the rolling windows should be
  • Whether to auto-detect optimal settings
  • What lag and lead features to create

How It Works

This unified options class configures all time series feature extractors including rolling statistics, volatility measures, correlation calculations, and lag/lead features.

Constructors

Constructor Summary
TimeSeriesFeatureOptions()

Properties

Property Summary
AnomalyFeatures EnabledAnomalyFeatures { get; set; } Gets or sets which anomaly detection features to calculate.
DateTime? TimeSeriesStartDate { get; set; } Gets or sets the start date of the time series for calendar calculations.
DateTime[] HolidayDates { get; set; } Gets or sets custom holiday dates to generate holiday features.
DifferencingFeatures EnabledDifferencingFeatures { get; set; } Gets or sets which differencing features to compute.
EdgeHandling EdgeHandling { get; set; } Gets or sets how edge cases (beginning of series) should be handled.
OhlcColumnConfig OhlcColumns { get; set; } Gets or sets the OHLC column configuration for proper volatility calculations.
RollingRegressionFeatures EnabledRegressionFeatures { get; set; } Gets or sets which rolling regression features to calculate.
RollingStatistics EnabledStatistics { get; set; } Gets or sets which rolling statistics to calculate.
SeasonalityFeatures EnabledSeasonalityFeatures { get; set; } Gets or sets which seasonality features to generate.
TechnicalIndicators EnabledIndicators { get; set; } Gets or sets which technical indicators to calculate.
TimeSpan? TimeSeriesInterval { get; set; } Gets or sets the time interval between data points for calendar feature calculation.
VolatilityMeasures EnabledVolatilityMeasures { get; set; } Gets or sets which volatility measures to calculate.
WindowAutoDetectionMethod AutoDetectionMethod { get; set; } Gets or sets the auto-detection method for window sizes.
bool AutoDetectWindowSizes { get; set; } Gets or sets whether to automatically detect optimal window sizes.
bool CalculateMomentum { get; set; } Gets or sets whether to calculate momentum indicators.
bool CalculateReturns { get; set; } Gets or sets whether to calculate returns (simple and log).
bool EnableAnomalyDetection { get; set; } Gets or sets whether to calculate anomaly detection features.
bool EnableCorrelation { get; set; } Gets or sets whether to calculate rolling correlations.
bool EnableDifferencing { get; set; } Gets or sets whether to apply differencing transformations.
bool EnableRollingRegression { get; set; } Gets or sets whether to calculate rolling regression features.
bool EnableSeasonality { get; set; } Gets or sets whether to generate seasonality and calendar features.
bool EnableTechnicalIndicators { get; set; } Gets or sets whether to calculate technical indicators.
bool EnableVolatility { get; set; } Gets or sets whether to calculate rolling volatility measures.
bool FullCorrelationMatrix { get; set; } Gets or sets whether to calculate full correlation matrix or just upper triangle.
bool GenerateFeatureNames { get; set; } Gets or sets whether to generate descriptive feature names.
bool IsTradingDayData { get; set; } Gets or sets whether data represents trading days (skips weekends/holidays).
bool RiskFreeRateIsPeriodAdjusted { get; set; } Gets or sets whether the risk-free rate is already period-adjusted.
bool UseParallelProcessing { get; set; } Gets or sets whether to use parallel processing for large datasets.
double AnnualizationFactor { get; set; } Gets or sets the annualization factor for volatility calculations.
double BollingerBandStdDev { get; set; } Gets or sets the number of standard deviations for Bollinger Bands.
double CusumH { get; set; } Gets or sets the CUSUM decision threshold (h).
double CusumK { get; set; } Gets or sets the CUSUM sensitivity parameter (k).
double EwmaDecayFactor { get; set; } Gets or sets the decay factor (lambda) for EWMA volatility calculation.
double GarchAlpha { get; set; } Gets or sets the alpha parameter for GARCH(1,1) model.
double GarchBeta { get; set; } Gets or sets the beta parameter for GARCH(1,1) model.
double GarchOmega { get; set; } Gets or sets the omega (constant) parameter for GARCH(1,1) model.
double HodrickPrescottLambda { get; set; } Gets or sets the smoothing parameter (lambda) for Hodrick-Prescott filter.
double IqrMultiplier { get; set; } Gets or sets the IQR multiplier for outlier detection.
double MinimumAcceptableReturn { get; set; } Gets or sets the minimum acceptable return (MAR) for Sortino ratio calculation.
double RiskFreeRate { get; set; } Gets or sets the risk-free rate for Sharpe and Sortino ratio calculations.
double ZScoreThreshold { get; set; } Gets or sets the Z-score threshold for flagging anomalies.
double[] CustomPercentiles { get; set; } Gets or sets custom percentiles to calculate (in addition to standard quartiles).
int AdxPeriod { get; set; } Gets or sets the ADX (Average Directional Index) period.
int CciPeriod { get; set; } Gets or sets the CCI (Commodity Channel Index) period.
int DetrendingPolynomialDegree { get; set; } Gets or sets the polynomial degree for detrending.
int DifferencingOrder { get; set; } Gets or sets the differencing order (number of times to difference).
int FourierTerms { get; set; } Gets or sets the number of Fourier terms per seasonal period.
int HolidayWindowDays { get; set; } Gets or sets the number of days before/after holidays to flag as “near holiday”.
int IsolationForestSubsampleSize { get; set; } Gets or sets the subsample size for isolation forest.
int IsolationForestTrees { get; set; } Gets or sets the number of trees for isolation forest scoring.
int LongPeriod { get; set; } Gets or sets the long period for EMA/MACD calculations.
int MaxAutoDetectedWindows { get; set; } Gets or sets the maximum number of auto-detected window sizes.
int MaxWindowSize { get; set; } Gets or sets the maximum window size for auto-detection.
int MinWindowSize { get; set; } Gets or sets the minimum window size for auto-detection.
int ParallelThreshold { get; set; } Gets or sets the minimum data length to trigger parallel processing.
int RsiPeriod { get; set; } Gets or sets the RSI period.
int SeasonalDifferencingPeriod { get; set; } Gets or sets the seasonal period for seasonal differencing.
int ShortPeriod { get; set; } Gets or sets the short period for EMA/MACD calculations.
int SignalPeriod { get; set; } Gets or sets the signal period for MACD signal line.
int StlRobustIterations { get; set; } Gets or sets the number of iterations for STL decomposition robustness.
int StlSeasonalPeriod { get; set; } Gets or sets the seasonal period for STL decomposition.
int StochasticDPeriod { get; set; } Gets or sets the stochastic oscillator D period (smoothing).
int StochasticKPeriod { get; set; } Gets or sets the stochastic oscillator K period.
int? BenchmarkColumnIndex { get; set; } Gets or sets the index of the benchmark column for regression calculations.
int[] CorrelationWindowSizes { get; set; } Gets or sets the window sizes specifically for correlation calculations.
int[] LagSteps { get; set; } Gets or sets the lag steps for lagged feature generation.
int[] LeadSteps { get; set; } Gets or sets the lead steps for leading feature generation.
int[] SeasonalPeriods { get; set; } Gets or sets the seasonal periods for Fourier features.
int[] WindowSizes { get; set; } Gets or sets the window sizes for rolling calculations.
string FeatureNameSeparator { get; set; } Gets or sets the separator for feature name components.
string[] InputFeatureNames { get; set; } Gets or sets the input feature names (column names).

Methods

Method Summary
List<string> Validate() Validates the options and returns any validation errors.
TimeSeriesFeatureOptions CreateForFinance() Creates a new options instance with default settings optimized for financial data.
TimeSeriesFeatureOptions CreateMinimal() Creates a new options instance with minimal settings for fast processing.