Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Issue

Tradefwd (tradefwdcancel) transaction is used in 2 situations:

  1. To open a forward

  2. To close a forward prior to settlement date. 

The issue is cashdbo.cash_activity.performance_flow_descr  descr gets populated based on the trans_type with either a value of “positive”, “negative” or “no flow”.   Currently, for trans_type tradefwd (tradefwdcancel) . the  , the performance_flow_descr is  is set to “POSITIVE” .   This is appropriate for situation #1 when a forward is opened.   However,   if the tradefwd is posted to close the forward, the performance_flow_descr should be “NEGATIVE”.

...

Solution

To identify or distinguish when a tradefwd (tradefwd cancel) is used to close a forward from when it is used to open, and then change the performance_flow_descr to “NEGATIVE”  “NEGATIVE” value when it is used to close (situation #2).

The field that identifies this situation is tradesdbo.trade.record_type.   For transactions with a transaction type or code  tradefwd (tradefwdcancel), and  tradesdbo.trade.record_type  value of “180”  or “280, set cashdbo.performance_flow_descr  to “ NEGATIVE”.

This change affects cash activity records.   Performance Flow Desc Update exporter (Eagle Pace) seems to lend itself to this sort of logic.   In reviewing the procedure , it highlighted some other changes related to data logic, parameters, and when it should be run, that I will include here as well.

...

Request

Modify the Performance Flow Desc Update Exporter (PFD)     (Eagle Pace)

  1. For transactions with tradesdbo.trade.record_type of 180 or 280 and transaction type of tradefwd or tradefwdcancel change the cashdbo.performance_flow_descr to “NEGATIVE”
    Below is a query that identifies records for reference.

    Code Block
    languagesql
    SELECT C.* , T.RECORD_TYPE

...

  1. 
    FROM CASHDBO.CASH_ACTIVITY C, TRADESDBO.TRADE T

...

  1.  
    WHERE C.TRANS_TYPE IN ('TRADEFWD', 'TRADEFWDCANCEL')

...

  1. 
    AND T.RECORD_TYPE IN ('180', '280')

...

  1. 
    AND T.POSITION_ID = C.POSITION_ID

...

  1. 
    AND T.SECURITY_ALIAS = C.SECURITY_ALIAS

...

  1. 
    AND C.SRC_INTFC_INST = '14'

    Source: STARDIRECT
    Entities: Should impact both Mutual Fund and Institutional Accounts

  2. Date Logic: The date logic in this exporter should mirror that logic recently updated in the Cash Performance exporter procedure (cpf_eagle_pace_exp_sp). Sql statement included below for reference. Mark Tedesco can coordinate on the date logic to ensure it aligns with recent changes. New date logic:

    Code Block
    languagesql
    BEGIN

...

  1. 
    SELECT CURR_DT

...

  1. 
    INTO L_Post_Date

...

  1. 
    FROM RULESDBO.PROCESS_CENTER

...

  1. 
    WHERE PROCESS_CENTER_DESC = 'PRODUCTION PROCESS CENTER';

...

  1. 
    EXCEPTION

...

  1. 
    WHEN No_Data_Found THEN

...

  1. 
    L_Post_Date := NULL;

...

  1. 
    END;

...

  1. 
    END IF;

...

  1. 
    --Default to SYSDATE if Process Center date not fonund

...

  1. 
    IF (L_Post_Date IS NULL) THEN

...

  1. 
    L_Post_Date := TRUNC(SYSDATE);

...

  1. 
    END IF;

...

  1. 
    BEGIN

...

  1. 
    SELECT Max(business_date) INTO L_Prev_Buisness_date

...

  1. 
    FROM PACE_MASTERDBO.BUSINESS_CALENDAR

...

  1. 
    WHERE business_date < L_Post_Date

...

  1. 
    AND DAILY_FLAG = '1';

...

  1. 
    END;

...

  1. 
    L_Post_Date := L_Prev_Buisness_date;

...

  1. 
    /////////

...

  1. 
    WHERE (CA.POST_DATE >= L_Post_Date)
  2. Ensure procedure runs in the overnight and intraday cycle

  3. clean up script required for existing records