This project visualizes random walk simulations in 1D, 2D, and 3D spaces, demonstrating the paths followed by the random walks in various dimensions.
In this simulation, an entity starts from position 0 and makes steps to the left or right. This is represented by a line graph where the x-axis denotes the steps taken, and the y-axis denotes the position.
The visualization of the 1D random walk can be viewed by running the corresponding sections of the code, which will generate a line graph representing the walk.
In this simulation, an entity starts from position (0,0) and can move in four possible directions: up, down, left, or right.
Running the corresponding sections of the code will yield a plot representing the 2D random walk. Each point in the plot represents the entity's position after each step.
This simulation is an extension of the 2D random walk, with an entity starting from position (0,0,0) and having the possibility to move in six different directions: forward, backward, left, right, up, or down.
Running the 3D random walk section of the code will generate a 3D plot visualizing the path taken by the entity in three dimensions.
- matplotlib
- random
To run the simulations, execute the provided Python scripts. Each section in the script corresponds to a different dimension of random walk, and you can visualize them by running the respective sections.
We welcome contributions to this project. To contribute:
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
For any questions or inquiries, please contact support@pyfi.com - Subject: Github Repo Q, RandomWalk.
For a full article walkthrough please visit > (https://pyfi.com/blogs/articles/random-walk-in-finance) < and learn more about PyFi's award winning Python for Finance courses which have been trusted by the top financial institutions in the United States and Canada multiple years running here >> https://www.pyfi.com <<