Triggers
Class TriggerAtPercentIncrease

java.lang.Object
  extended byTriggers.Trigger
      extended byTriggers.TriggerAtPercentIncrease

public class TriggerAtPercentIncrease
extends Trigger

Event is triggered by a q (0 < q) percent increase in the discounted price of some asset.


Constructor Summary
TriggerAtPercentIncrease(Asset asset, int q)
          
 
Method Summary
 boolean isTriggered(int t, int s)
          The trigger is a q percent increase in the discounted asset price since time t.
 
Methods inherited from class Triggers.Trigger
nextTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriggerAtPercentIncrease

public TriggerAtPercentIncrease(Asset asset,
                                int q)

Parameters:
asset - asset observed for price change triggering the event.
q - percent increase in discounted asset price triggering the event.
Method Detail

isTriggered

public boolean isTriggered(int t,
                           int s)

The trigger is a q percent increase in the discounted asset price since time t.

Specified by:
isTriggered in class Trigger
Parameters:
t - reference time < s.
s - current time.