Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
augurey14 committed Dec 15, 2017
1 parent cb17360 commit ee3dca9
Show file tree
Hide file tree
Showing 17 changed files with 951 additions and 476 deletions.
8 changes: 4 additions & 4 deletions companies_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Symbol,Weight or dollar amount (must include $)
4,GS
5,OIL
6,DIS
7,ABC
8,DEF
9,GHI
10,JKL
7,MSFT
8,KOF
9,COKE
10,KO
1 change: 1 addition & 0 deletions downloadHistoricalData.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if [ -d "stockData/" ]; then
rm -rf -R stockData
fi
mkdir stockData
cp companies_list.txt stockData

for s in $oldestCompanies; do
echo "$s"
Expand Down
Binary file added output1/._SUCCESS.crc
Binary file not shown.
Binary file added output1/.part-00000.crc
Binary file not shown.
File renamed without changes.
10 changes: 10 additions & 0 deletions output1/part-00000
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[2000-01-05,-6487]
[2000-02-04,-4431]
[2000-03-03,-4427]
[2000-04-11,-6845]
[2000-06-19,-3270]
[2000-07-18,-2878]
[2000-08-17,-2645]
[2000-09-07,-3404]
[2000-10-23,-4429]
[2000-11-22,-5942]
8 changes: 4 additions & 4 deletions src/main/java/com/hortonworks/example/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ Object run(String[] args, JavaRDD<String> filteredFileRDD,String stockDataDir) {
float mostLikely = new Float(percentilesRow.get(0).getList(0).get(1).toString()) / 100;
float bestCase = new Float(percentilesRow.get(0).getList(0).get(2).toString()) / 100;

System.out.println("In a single day, this is what could happen to your stock holdings if you have $" + totalInvestement + " invested");
System.out.println("Over the time period, this is what could happen to your stock holdings if you have $" + amt + " invested");
System.out.println(String.format("%25s %7s %7s", "", "$", "%"));
System.out.println(String.format("%25s %7d %7.2f%%", "worst case", Math.round(totalInvestement * worstCase / 100), worstCase));
System.out.println(String.format("%25s %7d %7.2f%%", "most likely scenario", Math.round(totalInvestement * mostLikely / 100), mostLikely));
System.out.println(String.format("%25s %7d %7.2f%%", "best case", Math.round(totalInvestement * bestCase / 100), bestCase));
System.out.println(String.format("%25s %7d %7.2f%%", "worst case", Math.round(amt * worstCase / 100), worstCase));
System.out.println(String.format("%25s %7d %7.2f%%", "most likely scenario", Math.round(amt * mostLikely / 100), mostLikely));
System.out.println(String.format("%25s %7d %7.2f%%", "best case", Math.round(amt * bestCase / 100), bestCase));

// return worstCase;

Expand Down
232 changes: 0 additions & 232 deletions stockData/ABC.csv

This file was deleted.

232 changes: 232 additions & 0 deletions stockData/COKE.csv

Large diffs are not rendered by default.

232 changes: 0 additions & 232 deletions stockData/GHI.csv

This file was deleted.

Empty file removed stockData/JKL.csv
Empty file.
232 changes: 232 additions & 0 deletions stockData/KO.csv

Large diffs are not rendered by default.

232 changes: 232 additions & 0 deletions stockData/KOF.csv

Large diffs are not rendered by default.

232 changes: 232 additions & 0 deletions stockData/MSFT.csv

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions stockData/companies_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Symbol,Weight or dollar amount (must include $)
4,GS
5,OIL
6,DIS
7,ABC
8,DEF
9,GHI
10,JKL
7,MSFT
8,KOF
9,COKE
10,KO
Binary file modified target/classes/com/hortonworks/example/Main.class
Binary file not shown.
Binary file modified target/monte-carlo-var-1.0-SNAPSHOT.jar
Binary file not shown.

0 comments on commit ee3dca9

Please sign in to comment.