Tool Overview
The Stochastic Differential Equation Simulator Tool generates and visualizes paths of a Brownian motion process. You can adjust parameters such as drift, volatility, and time increment to see how they affect the simulation.
Features
- Drift Form: Defines the drift function, which affects the overall trend of the Brownian motion.
- Constant: Arithmetic Brownian Motion
- Proportional to x: Drift is proportional to the current position (
x
).
- Proportional to 1/x: Drift is proportional to the inverse of the current position (
1/x
).
- Mean Reversion: Drift pulls the process towards a long-term mean with a specified mean reversion rate.
- Volatility Form: Defines the volatility function, which affects the variability of the Brownian motion.
- Constant: Standard Brownian motion with constant volatility.
- Proportional to x: Volatility is proportional to the current position (
x
).
- Proportional to 1/x: Volatility is proportional to the inverse of the current position (
1/x
).
- Drift Coefficient: A scalar coefficient that multiplies the drift function. Adjusting this value changes the strength of the drift.
- Volatility Coefficient: A scalar coefficient that multiplies the volatility function. Adjusting this value changes the intensity of the volatility.
- Initial Position (x0): The starting value of the Brownian motion path.
- Time Increment (dt): The time step used in the simulation. Smaller values of
dt
provide a more accurate simulation but require more computation.
- Long Term Mean: (Available only for Mean Reversion drift) The long-term mean to which the process reverts.
- Mean Reversion Rate: (Available only for Mean Reversion drift) The rate at which the process reverts to the long-term mean.
Interactive Elements
- Drift Form Dropdown: Select the type of drift function to use. If "Mean Reversion" is selected, additional fields for long-term mean and mean reversion rate will appear.
- Volatility Form Dropdown: Select the type of volatility function to use.
- Drift Coefficient Input: Enter a scalar value to adjust the drift strength.
- Volatility Coefficient Input: Enter a scalar value to adjust the volatility strength.
- Initial Position Input: Enter the starting value for the Brownian motion path.
- Time Increment Input: Set the time increment (
dt
) for the simulation.
- Long Term Mean Input: Enter the long-term mean (only visible if "Mean Reversion" is selected).
- Mean Reversion Rate Input: Enter the mean reversion rate (only visible if "Mean Reversion" is selected).
- Update Button: Click to generate a new simulation based on the current parameters.
- Save Button: Save the current chart as an image file (
.png
format).
- Export Button: Export the simulation data to a CSV file for further analysis.
Understanding the Chart
- X-Axis: Represents time.
- Y-Axis: Represents the position of the Brownian motion at each time step.
- Line Color: Adjusted using the color picker.
- Points: Represent the position of the Brownian motion at discrete time steps.
Tips for Usage
- Experiment with Parameters: Try different combinations of drift and volatility functions to see how they affect the path of the Brownian motion.
- Export Data: Export the data to analyze the Brownian motion path using other tools or for documentation purposes.
Troubleshooting
- No Chart Displayed: Ensure all required fields are filled and valid. Check for JavaScript errors in the browser console.
- Incorrect Chart Data: Verify that the parameters and functions are correctly set and that there are no typos or logical errors.