Skip to content

Commit

Permalink
added more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sameerlal committed Apr 25, 2019
1 parent 4f77ecd commit 6b0a715
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
8 changes: 8 additions & 0 deletions marketmaker.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
(********************************************************************
Market Maker
The Market Maker module holds information about the MM's previous
bid asks spreads. It also includes getters and setters and
basic statistics. For more statistics, we draw from the statistics module.
********************************************************************)

open Pervasives
open Sys

Expand Down
5 changes: 3 additions & 2 deletions marketmaker.mli
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
(** Marketmaker
(******************************************************************
Marketmaker
Representation of the marketmaker - player - during the course of the game.
This module keeps track of the marketmaker's bid/ask prices and the
transactions that take place between the player and traders. It contains
structs to hold this data and has functions to implement changes to and
display the data.
*)
********************************************************************)
(** The abstract type of values representing adventures. *)
type bidask = {
trade_type : string;
Expand Down
5 changes: 5 additions & 0 deletions parse.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
(********************************************************************
Parser
The parser module parses the "fermi.json" file and extracts its fields.
********************************************************************)
open Yojson.Basic.Util
open String

Expand Down
12 changes: 12 additions & 0 deletions stats.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ open Marketmaker
* - Newton-Raphson Method for Curve approximation (Secant estimate)
* - Chebyschev Variance Probability Calculator
* - Markov Chain analysis using three features
* - Graph Analysis
*
* DATA ANALYSIS
* - Mean spread, bids, asks, trade count
Expand All @@ -17,6 +18,17 @@ open Marketmaker
* In implementaiton 1, the cheat command currently compares previous
* bid/asks and uses a linear regression model to suggest the next move,
* referencing the actual value.
*
* In implementation II, the cheat command factors in a least-squares
* regression model to predict your next move. It compares this to
* the actual value of the dice roll. Based off of your previous ask/bids
* we apply a Gaussian blur matrix to this to find another average value.
* We then use Chebyschev's inequality and the variance of your previous
* moves to appropriately offset this second average from the expected
* rolls. Finally, we incorporate the first average, subtract the two
* and present that as a good guess for the next move.
* This is essentially the procedure a market maker would use to price
* the next bid/ask spread.
*)

(*
Expand Down
10 changes: 10 additions & 0 deletions trader.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
(********************************************************************
Trader
The Trader module contains the trader type, getters and setters
as well as basic statistics analysis. It also includes at least
four AI methods which are used as the backend for trading opponents.
There is also a contention function which decides which trader
gets to trade if multiple traders wish to transact.
********************************************************************)

open Pervasives
open Random

Expand Down

0 comments on commit 6b0a715

Please sign in to comment.