cjol / Algo-Trading

An algorithmic trading game.
0 stars 0 forks source link

TickData and Outputs #6

Open alanrusnak opened 10 years ago

alanrusnak commented 10 years ago

Hey guys, before I start working on TickData and Outputs, I just wanted to make sure we are on the same page when it comes to the interfaces. Currently, TickData is empty and I dont see any references to it. I assume it will be initialised in the marketView and marketView during every tick will send an update to TickData. What do we want to store there? Cash, Orders placed, Orders Exectued, Amount of Each stock that is held. Anything else? The abstract class Output will be extended with concerete classes like PortfolioValue and user can specify which outputs he wants (and appropriate outputs will be selected via reflection?). Where should most of the processing take place? In TickData or Output?

LawrenceEsswood commented 10 years ago

Basically my view. Only TickData should do no processing and should be immutable. It should be constructed by MarketView and passed to Output. I.e. in markets update method TickData d = new TickData(...); for(Output o: Outputs) o.evaluateTickData(d);

LawrenceEsswood commented 10 years ago

All processing should then occur in output as each output does see fit.

alanrusnak commented 10 years ago

I wrote a basic implementation.

  1. Is cloning going to take place in the MarketView?
  2. How do we calculate Profit/Loss if there is no global price of the stock? availableFunds + [(midMarket * volume) for each stock]?