Enron email

Algorithmic Indexing

3 Nov 2000, 14:12 UTC

Re: 'NG' positions roll-off logic

From
Robin Rodrigue robin.rodrigue@enron.com
To
Crystal Hyde
Date
Fri, 3 Nov 2000 06:12:00 -0800 (PST)

The sender added no text of their own; everything below is quoted or forwarded.

Quoted or forwarded from earlier messages
---------------------- Forwarded by Robin Rodrigue/HOU/ECT on 11/03/2000 
02:13 PM ---------------------------
   
	Enron North America Corp.
	
	From:  Frank Hayden @ ENRON                           11/03/2000 09:10 AM
	

To: Bilal Bajwa/NA/Enron@Enron, Robin Rodrigue/HOU/ECT@ECT
cc:  
Subject: Re: 'NG' positions roll-off logic


---------------------- Forwarded by Frank Hayden/Corp/Enron on 11/03/2000 
09:13 AM ---------------------------
   
	
	
	From:  Frank Hayden                           08/26/2000 04:02 PM
	

To: Bilal Bajwa/NA/Enron@Enron
cc:  

Subject: Re: 'NG' positions roll-off logic


---------------------- Forwarded by Frank Hayden/Corp/Enron on 08/26/2000 
04:01 PM ---------------------------


Ganapathy Ramesh@ECT
08/26/2000 03:37 PM
To: Frank Hayden/Corp/Enron@Enron
cc:  

Subject: Re: 'NG' positions roll-off logic  


Roll-Off logic as requested by you.

Ramesh



   
	Enron North America Corp.
	
	From:  Wei Hu                           08/07/2000 03:37 PM
	

To: Jeremy Wong/HOU/ECT@ECT
cc: Ganapathy Ramesh/HOU/ECT@ECT 
Subject: 'NG' positions roll-off logic

Jeremy,

Here is the roll-off logic for 'NG':

1.  For regular ERMS books (not Intra Month book),  first we get the promptDt,

 promptDt := TO_DATE('01'||TO_CHAR(ADD_MONTHS(TO_DATE(p_effDt,'J'),1), 
'MONYYYY'), 'DDMONYYYY');

 Then if p_commodity_cd = 'NG', we go get the cutOff date,
  SELECT exp_dt
           INTO expDate
           FROM egs_expiration_dates
         WHERE expiration_rule_cd = 'Natural Gas Futures'
             AND ref_period_dt = promptDt;

 IF (TO_DATE(p_effDt, 'J') > expDate) THEN
        cutOff := ADD_MONTHS(promptDt,1);
      ELSE
        cutOff := promptDt;
      END IF;

 The strip flag, when populated into rms_deal_legs table, is computed using 
the following DECODE statement,

 DECODE(SIGN(TO_NUMBER(TO_CHAR(ref_period_dt,'J')) - 
TO_NUMBER(TO_CHAR(cutOff,'J'))),-1,-2,NULL).

 Positions with strip flag as -2 will be rolled off by V@R program.

2.  For Intra Month books, first we get the nextMonthDt,
 nextMonthDt := 
TO_NUMBER(TO_CHAR(TO_DATE('01'||TO_CHAR(ADD_MONTHS(TO_DATE(p_effDt,'J'),1),'MM
')||
        TO_CHAR(ADD_MONTHS(TO_DATE(p_effDt,'J'),1),'YYYY'), 'DDMMYYYY'),'J'));

 Then if book flag is 'P', the strip flag, when populated into rms_deal_legs 
table, is computed using the 
 following DECODE statement,

     if pub cd starts with 'GD', then the positions are taken in as 
'FLOATVSFLOAT', and strip flags for
  two legs are,
  DECODE(SIGN(TO_NUMBER(TO_CHAR(ref_period_dt,'J')) - nextMonthDt), 1, -1, 0, 
-1, -1, -2, NULL) and
  DECODE(SIGN(TO_NUMBER(TO_CHAR(ref_period_dt,'J')) - nextMonthDt), 1, 1, 0, 
1, -1, -2, NULL),
  respectively.

     else if pub cd does not start with 'GD', then only positions with 
swap_cd as 'S' are captured as    'SWAP'.  The strip flag is,
  DECODE(SIGN(TO_NUMBER(TO_CHAR(ref_period_dt,'J')) - nextMonthDt), 1, 1, 0, 
1, -1, -2, NULL)

 Else if book flag is 'G', the strip flag in rms_deal_legs is hard coded as 1.


Thanks,

Wei