-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
57 lines (23 loc) · 981 Bytes
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#http://www.eoddata.com/stockList/NASDAQ.htm
Client account £$
buy stock @ market rate
sell stock
[Portfolio]
contains stock
[Stock] - name of stocks and quantity
#Create an account for client (name, balance).
#Every client can create multiple portfolios.
***************
A client can buy stocks at market rate; these stocks will be added to a portfolio and the purchase amount subtracted from cash. (You cannot go to a negative cash balance).
A client can sell a stock. The proceeds go into his account.
****************
#List all client portfolios and their values
(each portfolio value and sum of portfolio values) and
the account balance.
#List all stocks in a portfolio.
#List all clients.
Note:
Each time a portfolio balance is calculated, the program needs to go out to the web and get current stock prices.
yahoofinance gem:
YahooFinance::get_quotes(YahooFinance::StandardQuote, 'AAPL')['AAPL'].lastTrade
=> 453.62