wearemolecule/hecto-octo-ironman — pull request #1 by pconnelly (2013-11-08 00:13:09+00:00)
Title: Interview Challenge

The article at http://www.cmegroup.com/clearing/files/Clearing-Forwards.pdf seemed to indicate that a 'Sell' should be represented in the portfolio as a negative number and a 'Buy' should be represented as a positive number. I'm not quite sure how the details work, so as a placeholder, I used an if/else block at the end of calcMTM in \hecto-octo-ironman\app\models\trade.rb. Right now it does nothing, but I can easily adjust the values returned by the function if necessary.

I also changed the names of some of the database fields ('Buy/Sell' -> 'buy') and noticed afterwards that you might be using some of your own pre-written tests. The app passes all of my tests, but I can modify those names as well if necessary

-Patrick Connelly