Triggers
Class TriggerAtPercentDecline

java.lang.Object
  extended byTriggers.Trigger
      extended byTriggers.TriggerAtPercentDecline

public class TriggerAtPercentDecline
extends Trigger

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


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

TriggerAtPercentDecline

public TriggerAtPercentDecline(Asset asset,
                               int q)

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

isTriggered

public boolean isTriggered(int t,
                           int s)

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

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