-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
38 lines (27 loc) · 1.81 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
My Trader -- REALLY NOT UP TO DATE!!! (as of 07/29/14)
================================================
Overview
This is my own attempt at building an algorithmic trader. My current plan is to split the process into building three parts:
1) a scraper
2) an analyzer
3) a trade executer
The scraper will just get data from some finance API (ex. Yahoo), the analyzer will decided what to do with the data from the scraper, and the trade exectuer will actually commit the plans of the analyzer. I plan to complete the scraper and analyzer, but perhaps not the executer as I don't want to actually use my own money.
I am doing this project both to learn more about functional programming and because I am interested in finance.
Update:
After trying to build tests from scratch, I realized that many of the tests are very similar. Therefore, I decided to create a test framework that involves asynchronous unit tests. The current signature for the test framework is:
val assert_test : ('a -> 'a -> bool) -> 'a Async.Std.Deferred.t -> 'a -> ?printer:('a -> string) -> string -> unit
val assert_equal : 'a Async.Std.Deferred.t -> 'a -> ?printer:('a -> string) -> string -> unit
val run_suite : 'a -> unit
Or in more Pythonic terms,
fun assert_test(comparison_function, Deferred value, expected value, optional printer, test ID)
fun assert_equal(Deferred value, expected value, optional printer, test ID)
fun run_suite()
So any test case added with assert_test or assert_equal is automatically stored in the test_suite which is then run by run_suite
================================================
Dependencies
core, async, yojson, cohttp, uri
================================================
To build, run "make" from the the root directory
To start the scraper, run "make run-scraper"
To clean, run "make clean"
To run tests, run "make tests"