-
start_balance
: The starting investment amount. -
symbol
: Symbol of the security -
n_years
: The number of years for which the projection (plan) is to be determined.
-
reinvested
: Must be eithertrue
orfalse
. The default value iftrue
. -
tax_percent
: A value for tax percentage to be cut from the dividend amount for each year. -
emp_contrib
: Amount of monthly contribution by the employee.
The data is returned in JSON format. The JSON contains a list of objects containing the following fields for each year:
-
year
: A positive integer representing the year number. Starts at 1. -
start_balance
: Starting balance for thisyear
. -
share_price
: Starting share price of this year. -
number_of_shares
: Number of shares bought this year. -
dividend
: Dividend amount generated this year. -
reinvested
: Amount reinvested after cutting tax, if any, from the dividend amount. -
growth
: Growth in investment based on compound annual growth rate. -
end_balance
: Ending balance for this year. Will be the starting balance for next year
- For getting the 5 year DRIP of the MMM stock with 15000$ as starting amount:
root_url/api?start_balance=15000&n_years=5&symbol=MMM
- For getting the above data with 9.8% tax applied
root_url/api?start_balance=15000&n_years=5&symbol=MMM&tax_percent=9.8
- For getting 10 year plan for IBM with 5000$ as starting investment amount. This time we want to see the balance without reinvestment.
root_url/api?start_balance=5000&n_years=10&symbol=IBM&reinvested=false
Mohammad Hussain Nagaria
Email: hussainbhaitech@gmail.com
Github: NagariaHussain