VIDYA indicator with adaptive smoothing based on market volatility.

This commit is contained in:
Miha Kralj
2025-12-10 20:07:46 -05:00
parent 66b1fc3dca
commit 053234045f
15 changed files with 918 additions and 27 deletions
+4
View File
@@ -17,6 +17,7 @@ The price evolution follows the stochastic differential equation:
$$ dS_t = \mu S_t dt + \sigma S_t dW_t $$
Where:
- $S_t$: Asset price at time $t$
- $\mu$: Drift (expected return)
- $\sigma$: Volatility (standard deviation of returns)
@@ -37,6 +38,7 @@ public class GBM : IFeed
## Usage
### 1. Initialization
```csharp
// Default: Start at 100, 5% drift, 20% volatility
var gbm = new GBM();
@@ -46,6 +48,7 @@ var volatileGbm = new GBM(startPrice: 50.0, mu: 0.10, sigma: 0.50);
```
### 2. Streaming Generation
```csharp
// Generate a new bar
var bar = gbm.Next(isNew: true);
@@ -59,6 +62,7 @@ for (int i = 0; i < 5; i++)
```
### 3. Batch Generation
```csharp
long startTime = DateTime.UtcNow.Ticks;
var interval = TimeSpan.FromMinutes(1);