This financial analysis tool automates Net Present Value (NPV) calculations and risk assessments using Monte Carlo Simulations (MCS). Designed to fetch historical cash flow data and visualize potential outcomes, it aims to facilitate informed investment decisions. The project leverages advanced statistical techniques to improve financial decision-making, optimizing investment strategies through detailed risk assessments and real-time data analysis.
- Automated extraction of historical cash flow data from Yahoo Finance ensures accuracy and timeliness in financial analysis.
- Calculates the Net Present Value using variable discount rates to determine investment profitability.
- Employs stochastic modeling to simulate a wide range of financial outcomes, enhancing the reliability of investment analyses.
- Probability of Exceeding Threshold: Determines the likelihood that NPV exceeds a set benchmark, offering insights into investment reliability.
- Expected Loss: Calculates the potential average loss if NPV falls below the threshold, crucial for assessing the financial risk and preparing for adverse outcomes.
- Generates intuitive charts and histograms to illustrate potential financial scenarios and risk profiles, promoting clearer decision-making.
- Python: For data handling and computation.
- NumPy, Pandas: Core libraries for numerical and data operations.
- Matplotlib, Seaborn, Pool: For creating informative and attractive visualizations.
- Concept: Assesses the likelihood that NPV surpasses a predetermined value, reflecting the investment's potential to meet expected returns.
- Implementation: Post-simulation, the proportion of scenarios where NPV exceeds the threshold is computed, indicating the investment's risk level.
- Concept: Averages losses where NPV is below the threshold, quantifying the downside risk.
- Implementation: Calculates mean loss from negative NPV outcomes, essential for understanding the financial stakes and preparing accordingly.
-
Clone the repository:
git clone https://github.com/leiassyun/Monte_Carlo_NPV.git cd Monte_Carlo_NPV -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required libraries:
pip install -r requirements.txt
-
Run the application:
python app.py
- Run the application by executing
python app.py. - Enter the company's ticker symbol when prompted.
- View the calculated NPV and Monte Carlo simulation results.
- Analyze the risk metrics provided by the tool for informed investment decisions.
- Yahoo Finance API: Utilized for fetching real-time and historical financial data.

