Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::PricingTransactionPairProfitFunction Class Reference

#include <PricingTransactionPairProfitFunction.h>

Inheritance diagram for PLearn::PricingTransactionPairProfitFunction:

Inheritance graph
[legend]
Collaboration diagram for PLearn::PricingTransactionPairProfitFunction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PricingTransactionPairProfitFunction ()
 PricingTransactionPairProfitFunction (real the_multiplicative_cost, real the_additive_cost=0, real the_per_unit_cost=0)
 PLEARN_DECLARE_OBJECT (PricingTransactionPairProfitFunction)
virtual string info () const
 returns a bit more informative string about object (default returns classname())

virtual real evaluate (const Vec &output, const Vec &target) const
 returns K(x1,x2)


Static Protected Member Functions

void declareOptions (OptionList &ol)
 Recognized options: all 3 fields.


Protected Attributes

real multiplicative_cost
 transaction loss

real additive_cost
 transaction loss

real per_unit_cost
 transaction loss


Private Types

typedef Kernel inherited

Detailed Description

profit function that takes (output,target) as arguments and computes a profit. The output has at least 2 elements which represent the number of units of the security bought (or sold, if <0), and the cash change due to the transaction at time t1. The target vector contains at least one element which represents the price of the security at a later time t2. Profit is computed as follows: transaction_loss_t2 = nb_units_transaction>0 ? additive_cost + multiplicative_cost * |nb_units_transaction| * price_t2 : 0 profit = cash_earned_at_t1 + nb_units_transaction * price_t2 - transaction_loss_t2;

where additive_cost, multiplicative_cost, per_unit_cost are user-specified parameters that control transaction losses

Definition at line 67 of file PricingTransactionPairProfitFunction.h.


Member Typedef Documentation

typedef Kernel PLearn::PricingTransactionPairProfitFunction::inherited [private]
 

Reimplemented from PLearn::Kernel.

Definition at line 69 of file PricingTransactionPairProfitFunction.h.


Constructor & Destructor Documentation

PLearn::PricingTransactionPairProfitFunction::PricingTransactionPairProfitFunction  )  [inline]
 

Definition at line 76 of file PricingTransactionPairProfitFunction.h.

PLearn::PricingTransactionPairProfitFunction::PricingTransactionPairProfitFunction real  the_multiplicative_cost,
real  the_additive_cost = 0,
real  the_per_unit_cost = 0
[inline]
 

Definition at line 77 of file PricingTransactionPairProfitFunction.h.

References additive_cost, multiplicative_cost, and per_unit_cost.


Member Function Documentation

void PLearn::PricingTransactionPairProfitFunction::declareOptions OptionList ol  )  [static, protected]
 

Recognized options: all 3 fields.

Reimplemented from PLearn::Kernel.

Definition at line 63 of file PricingTransactionPairProfitFunction.cc.

References PLearn::declareOption(), and PLearn::OptionList.

real PLearn::PricingTransactionPairProfitFunction::evaluate const Vec output,
const Vec target
const [virtual]
 

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 51 of file PricingTransactionPairProfitFunction.cc.

References additive_cost, multiplicative_cost, per_unit_cost, and PLearn::Vec.

virtual string PLearn::PricingTransactionPairProfitFunction::info  )  const [inline, virtual]
 

returns a bit more informative string about object (default returns classname())

Reimplemented from PLearn::Object.

Definition at line 85 of file PricingTransactionPairProfitFunction.h.

PLearn::PricingTransactionPairProfitFunction::PLEARN_DECLARE_OBJECT PricingTransactionPairProfitFunction   ) 
 


Member Data Documentation

real PLearn::PricingTransactionPairProfitFunction::additive_cost [protected]
 

transaction loss

Definition at line 73 of file PricingTransactionPairProfitFunction.h.

Referenced by evaluate(), and PricingTransactionPairProfitFunction().

real PLearn::PricingTransactionPairProfitFunction::multiplicative_cost [protected]
 

transaction loss

Definition at line 72 of file PricingTransactionPairProfitFunction.h.

Referenced by evaluate(), and PricingTransactionPairProfitFunction().

real PLearn::PricingTransactionPairProfitFunction::per_unit_cost [protected]
 

transaction loss

Definition at line 74 of file PricingTransactionPairProfitFunction.h.

Referenced by evaluate(), and PricingTransactionPairProfitFunction().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:23:39 2004 for PLearn by doxygen 1.3.7