lump sum vs. dollar cost averaging.
I wasn't sure if "Lump-sum investing outperforms dollar cost averaging almost 75% of the time" is actually true. So I ran a small script.
Check out investment.ipynb
The points above the dotted black line is where dollar cost averaging is a better strategy than lump-sum
- A unix or unix-like x86 machine
- python 3.8 or higher.
- Running in a virtual environment (e.g., conda, virtualenv, etc.) is highly recommended so that you don't mess up with the system python.
pip install -r requirements.txt
- Double check the math
- Try other ticker symbols.
- Try cryptos.
- Come up with a better inflation rate, based on the investment starting date.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Run
make style && make quality
in the root repo directory, to ensure code quality. - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request