Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.31 KB

README.md

File metadata and controls

34 lines (28 loc) · 1.31 KB

Investment Comparison Script

Overview

This Python script compares the growth of two investment funds over a set number of years while considering different annual costs for each fund. It calculates and visualizes the future values of the investments, showcasing the impact of varying costs.

Description

The script uses matplotlib and numpy libraries to create two essential plots:

  1. Investment Growth Comparison: This plot shows how Fund 1 and Fund 2 evolve over time.
  2. Annual Cost Differences (Positive): It illustrates the absolute annual difference in value between the two funds due to costs.

Usage

To use the script, follow these steps:

  1. Ensure you have Python installed on your system.
  2. Clone this repository to your local machine.
  3. Open the script using a Python environment or IDE (e.g., PyCharm).
  4. Modify the script's constants, such as initial_investment, annual_growth_rate, cost_fund1_percentage, cost_fund2_percentage, and years, to suit your scenario.
  5. Run the script to see the investment comparison results and plots.

Requirements

  • Python 3.x
  • matplotlib
  • numpy

Example

Here's a sample example:

# Constants
initial_investment = 10000
annual_growth_rate = 0.10
cost_fund1_percentage = 0.5  # %
cost_fund2_percentage = 0.05  # %
years = 30

# Rest of the script...