Venice 0.751beta

nz.org.venice.portfolio
Interface Account

All Known Implementing Classes:
AbstractAccount

public interface Account

Generic interface for all financial account objects. This interface defines some generic properties that all accounts need to have such as name, type and value.

Author:
Andrew Leppard

Field Summary
static int CASH_ACCOUNT
          Account is a cash account (bank account, cash management account etc)
static int SHARE_ACCOUNT
          Account is a share trading account which contains a list of shares
 
Method Summary
 Currency getCurrency()
          Return the currency of the account.
 java.lang.String getName()
          Return the name of this account.
 int getType()
          Return the type of this account.
 Money getValue(EODQuoteBundle quoteBundle, int dateOffset)
          Return the value of this account on the given day.
 Money getValue(EODQuoteBundle quoteBundle, TradingDate date)
          Return the value of this account on the given day.
 void removeAllTransactions()
          Remove all transactions from account.
 void transaction(Transaction transaction)
          Perform a transaction on this account.
 

Field Detail

CASH_ACCOUNT

public static final int CASH_ACCOUNT
Account is a cash account (bank account, cash management account etc)

See Also:
Constant Field Values

SHARE_ACCOUNT

public static final int SHARE_ACCOUNT
Account is a share trading account which contains a list of shares

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Return the name of this account.

Returns:
name of the account

getType

public int getType()
Return the type of this account.

Returns:
type of the account, either CASH_ACCOUNT or SHARE_ACCOUNT

getValue

public Money getValue(EODQuoteBundle quoteBundle,
                      int dateOffset)
               throws MissingQuoteException
Return the value of this account on the given day.

Parameters:
quoteBundle - the quote bundle
dateOffset - fast date offset
Throws:
MissingQuoteException

getValue

public Money getValue(EODQuoteBundle quoteBundle,
                      TradingDate date)
               throws MissingQuoteException
Return the value of this account on the given day.

Parameters:
quoteBundle - the quote bundle
date - the date
Throws:
MissingQuoteException

getCurrency

public Currency getCurrency()
Return the currency of the account.

Returns:
default currency.

transaction

public void transaction(Transaction transaction)
Perform a transaction on this account.

Parameters:
transaction - transaction to occur

removeAllTransactions

public void removeAllTransactions()
Remove all transactions from account.


Venice 0.751beta