Skip to content

Instantly share code, notes, and snippets.

@jneira
Created December 19, 2010 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jneira/747554 to your computer and use it in GitHub Desktop.
Save jneira/747554 to your computer and use it in GitHub Desktop.
type Instrument = String
type Account = String
type Quantity = BigDecimal
type Money = BigDecimal
import java.util.{Calendar, Date}
val today = Calendar.getInstance.getTime
case class Trade(ref: String, ins: Instrument, account: Account, unitPrice: Money,
quantity: Quantity, tradeDate: Date = today) {
def principal = unitPrice * quantity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment