Triggers
Class TriggerAtPercentChange

java.lang.Object
  extended byTriggers.Trigger
      extended byTriggers.TriggerAtPercentChange

public class TriggerAtPercentChange
extends Trigger

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


Constructor Summary
TriggerAtPercentChange(Asset asset, int q)
          
 
Method Summary
 boolean isTriggered(int t, int s)
          The trigger is a q percent change 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

TriggerAtPercentChange

public TriggerAtPercentChange(Asset asset,
                              int q)

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

isTriggered

public boolean isTriggered(int t,
                           int s)

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

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