-
Notifications
You must be signed in to change notification settings - Fork 37
/
README
100 lines (73 loc) · 4.14 KB
/
README
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
-------------------------------------------------------------------------------
* Algorithmic Stock Trader
*
* @author: Steven Shaw
* @email: [email protected]
* @date: 8/18/12
-------------------------------------------------------------------------------
Overview:
The purpose of this application is to simulate trading on the United States
Stock market with an emphasis on automated trading. This application makes
it easy to code your own stock trading algorithms and test them. To do so,
simply copy the AlgorithmTemplate class and create your own algorithm. Each
algorithm must implement the Algorithm Interface. Then, add your algorithm
to the availableAlgorithms list in the ConsoleView class and run the application.
It does have one algorithm built in that uses Fibonacci Retracements.
The application uses the Yahoo! Finance API for stock data. I was going to
use the Google Finance API, however, I learned that it is being shutdown
in October of 2012. If you would like to use a different API to retrieve the
data, add a new class in the incoming_data_sources package.
Note that the ConsoleView class uses the Yahoo! Finance API in a few areas.
The application serializes the user's Portfolio upon exiting. To use a new
Portfolio, delete the "portfolio.ser" file and restart. Future versions
will not require this to use a new portfolio.
NOTE:
My application does not make real purchases. It merely simulates purchases.
Be weary of following the advice that the algorithms produce. This application
is meant to be a educational resource. Nothing more, nothing less.
How to run:
Either run the application in an IDE such as Eclipse or navigate to where
the executable jar is located and use the following command.
java -jar Algorithmic_Stock_Trader.jar
-------------------------------------------------------------------------------
Future Features
-------------------------------------------------------------------------------
Add and Remove funds.
Account Summary page.
Implement a way to construct a new Portfolio.
Modify the way the simulation duration is entered. Ex) 50 min or 2 hours.
Add a GUI.
Implement Short Selling and Buy To Cover Order Types. Menus already in place.
Implement market on close, limit, stop, stop limit, trailing stop $, and
trailing stop % price types. All the classes are created and in place.
Multi-thread the simulation to increase performance.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------------------------------------------------------------------------
Known Issues
-------------------------------------------------------------------------------
Sometimes the built in Algorithm purchases negative share amounts.
If $0 is entered when creating a portfolio, you can't purchase stocks
and you can't add money later.
Yahoo sometimes sends back random errors. Not sure of the cause.
Can only make trades and execute algorithms during regular market hours.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------------------------------------------------------------------------
Legal:
-------------------------------------------------------------------------------
I am licensing my application under The MIT License (MIT).
The complete license can be found in LICENSE.txt.
I (Steven Shaw) and ALL contributors are NOT RESPONSIBLE
for any financial loss you may endure while using this application.
The information that the application retrieves is meant for PERSONAL USE ONLY!
This application uses the Yahoo! Finance API to retrieve financial data.
By using this application you agree to Yahoo! Inc.'s Terms of Service.
Yahoo! Inc's Terms of Service can be found here:
http://info.yahoo.com/legal/us/yahoo/utos/utos-173.html
By accessing the Yahoo! site, you agree not to redistribute the information
found therein.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------------------------------------------------------------------------
Change Log:
-------------------------------------------------------------------------------
[email protected] Initial Revision
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++