-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSETUP-README.txt
319 lines (244 loc) · 12.5 KB
/
SETUP-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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
Unzip the submitted file and copy the JAR file to desired location in an empty folder.
commands to run the program:
1. jar tf pdp.jar
2. jar xf pdp.jar stocker
3. java -jar pdp.jar
To run this program on to get valuation of a portfolio from a set of multiple portfolios with different stocks:
[EXAMPLE FOLDER CONTAINS THIS FORMAT]
[you can directly go to step 3 if you want to run this program with default values, skip upload part (step 4) as well]
1. Get stocks & portfolio in given format :
> Stocks are CSV file with four fields :
Ticker Name, Date of Stock Purchase, Cost of one stock, Number of stocks
Ticker Name2, Date of Stock Purchase2, Cost of one stock2, Number of stocks2
...
> Portfolio format :
<Name of Portfolio>, <Date of Portfolio Creation>, -F:<FILENAME.csv>
<Name of Portfolio2>, <Date of Portfolio Creation2>, -F:<FILENAME.csv2>
...
2. Save your Portfolio and stock folder in the same folder.
3. Run the jar file
4. From start menu select option 2 then select option 2 (Relative Path), provide the path "example\portfolio.csv" or "example/portfolio.csv"
5. From start menu select option 3 to view all portfolios
5. Select ID of portfolio you want to get valuation of portfolios for
6. Enter date that you want to valuate your portfolios on & your answer will be present.
Detailed Example:
* Home Menu:
1. Create Portfolio
2. Upload Portfolio from given path
3. View Portfolio
Type 'quit' or 'exit' to close the program
Please select an option from 1-x from above: 1
Which type of portfolio do you want to create?
1. Fixed Portfolio
2. Flexible Portfolio2
* Create Portfolio Menu:
1. Add Shares
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 1
Enter Company Name: IBM
Enter Number of shares: 20
* Create Portfolio Menu:
1. Add Shares
2. Create Portfolio (Finalize current Portfolio)
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 2
Please write down the unique name of portfolioexample
* Home Menu:
1. Create Portfolio
2. Upload Portfolio from given path
3. View Portfolio
Type 'quit' or 'exit' to close the program
Please select an option from 1-x from above: 3
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 4
Select a 'Portfolio Name' from above list: example
Enter Company Name: AAPL
Enter Number of shares: 20
Please enter date in yyyy-mm-dd format: 2012-02-02
Paid amount from buying of Portfolio is: $9122.4
This company's number of stocks have been updated!
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 4
Select a 'Portfolio Name' from above list: example
Enter Company Name: ZZZ
Enter Number of shares: 23
Please enter date in yyyy-mm-dd format: 2021-02-02
Paid amount from buying of Portfolio is: $20.23
This company's number of stocks have been updated!
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 4
Select a 'Portfolio Name' from above list: example
Enter Company Name: UA
Enter Number of shares: 293
Please enter date in yyyy-mm-dd format: 2022-02-03
Paid amount from buying of Portfolio is: $4754.88
This company's number of stocks have been updated!
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 1
Select a 'Portfolio Name' from above list: example
+id:example
creationDate:2022-11-17
Shares in this Portfolio:
+companyName:IBM,purchaseDate:2022-11-17,price:137.83,numShares:20
+companyName:AAPL,purchaseDate:2012-02-02,price:456.12,numShares:20
+companyName:ZZZ,purchaseDate:2021-02-02,price:0.8795652173913043,numShares:23
+companyName:UA,purchaseDate:2022-02-03,price:16.228259385665528,numShares:293
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 3
Select a 'Portfolio Name' from above list: example
Please enter date in yyyy-mm-dd format: 2021-02-02
Cost Basis of Portfolio is: $9142.63
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 3
Select a 'Portfolio Name' from above list: 2012-02-09
Invalid Input!
Select a 'Portfolio Name' from above list: example
Please enter date in yyyy-mm-dd format: 2012-02-09
Cost Basis of Portfolio is: $9122.4
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 2
Select a 'Portfolio Name' from above list: example
Please enter date in yyyy-mm-dd format: 2022-02-02
Valuation of Portfolio is: $0.0
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 2
Select a 'Portfolio Name' from above list: example
Please enter date in yyyy-mm-dd format: 2022-11-17
Valuation of Portfolio is: $8054.68
Portfolios available:
------------------------------------------------------------------------------------
||Serial Number ||Portfolio Name ||Creation Date ||
||------------------||----------------------------------------||------------------||
||0. ||lkdsfjkl ||2022-11-17 ||
||------------------||----------------------------------------||------------------||
||1. ||example ||2022-11-17 ||
------------------------------------------------------------------------------------
* View Portfolio Menu:
1. View composition of a particular portfolio
2. Valuation of Portfolio on a specific date
3. Cost basis of a portfolio till a specific date
4. Purchase a share and add to portfolio
5. Sell a share from portfolio
6. Performance of portfolio over time
Type 'back' to return to Home Menu
Please select an option from 1-x from above: 2