fund-indicators/main.py

39 lines
1.1 KiB
Python
Raw Normal View History

2018-12-15 17:56:29 -08:00
# main.py
# Andrew Dinh
# Python 3.6.1
2018-12-16 17:58:25 -08:00
# Description:
'''
Asks users for mutual funds/stocks to compare
Asks to be compared (expense ratio, turnover, market capitalization, or persistence)
Asks for time period (Possibly: 1 year, 5 years, 10 years)
Makes the mutual funds as class Stock
Gets data from each API
Compare and contrast dates and end changeOverTime for set time period
NOTES: Later can worry about getting close values to make a graph or something
Gives correlation value using equation at the end (from 0 to 1)
2018-12-16 14:46:56 -08:00
2018-12-16 17:58:25 -08:00
FIRST TESTING WITH EXPENSE RATIO
'''
2018-12-16 14:46:56 -08:00
2018-12-19 21:32:14 -08:00
from StockData import Stock
2018-12-21 09:59:40 -08:00
listOfStocks = []
numberOfStocks = int(input("How many stocks or mutual funds would you like to analyze? "))
for i in range(0, numberOfStocks, 1):
print("Stock", i+1, ": ", end='')
stockName = str(input())
listOfStocks.append(i)
listOfStocks[i] = Stock()
listOfStocks[i].setName(stockName)
print(listOfStocks[i].name)
2018-12-19 21:32:14 -08:00
2018-12-21 09:59:40 -08:00
for i in range(0, numberOfStocks, 1):
print("\n")
print(listOfStocks[i].name)
Stock.main(listOfStocks[i])
'''
2018-12-19 21:32:14 -08:00
stockName = 'IWV'
stock1 = Stock(stockName)
print("Finding available dates and close values for", stock1.name)
2018-12-21 09:59:40 -08:00
Stock.main(stock1)
'''