1 2 3 4 5 6 7 8 9 10 11
open(R,$s_file); while(<R>) { if(/$search/) { chomp; s/\@|\$\{|\}|\(|\)|\*//g; my $match_line = $_; $cnt = grep(/$match_line/, @target); $i++; print "$i $cnt $match_line\n"; $cnt=0; } }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
="IF(@IS_POSITION()) THEN (${o:GenericInstrField(field='THEO/Domestic Rho')} * ${o:PositionWIFinal} * ${o:InstrFX} * ${o:GenericInstrField(field='FEED_2_CALC_PU_MULTIPLIER')}) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden" />
<output id="o:THEOForeignRhoWI" name="WI: THEOForeignRho" type="value" src="CustomEquation" whatif="true" equation="IF(@IS_POSITION()) THEN (${o:GenericInstrField(field='THEO/Foreign Rho')} * ${o:PositionWIFinal} * ${o:InstrFX} * ${o:GenericInstrField(field='FEED_2_CALC_PU_MULTIPLIER')}) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden" />
<output id="o:THEOGammaWI" name="WI: THEOGamma" type="value" src="CustomEquation" whatif="true" equation="IF(@IS_POSITION()) THEN (${o:GenericInstrField(field='THEO/Gamma')} * ${o:PositionWIFinal} * ${o:InstrFX} * ${o:GenericInstrField(field='FEED_2_CALC_PU_MULTIPLIER')}) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden" />
<output id="o:THEOVegaWI" name="WI: THEOVega" type="value" src="CustomEquation" whatif="true" equation="IF(@IS_POSITION()) THEN (${o:GenericInstrField(field='THEO/Vega')} * ${o:PositionWIFinal} * ${o:InstrFX} * ${o:GenericInstrField(field='FEED_2_CALC_PU_MULTIPLIER')}) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden" />
<output id="o:THEOThetaWI" name="WI: THEOTheta" type="value" src="CustomEquation" whatif="true" equation="IF(@IS_POSITION()) THEN (${o:GenericInstrField(field='THEO/Theta')} * ${o:PositionWIFinal} * ${o:InstrFX} * ${o:GenericInstrField(field='FEED_2_CALC_PU_MULTIPLIER')}) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden" />
<output id="o:THEODurRW" name="Eff Dur (Pos) RW" type="ratio" src="CustomEquation" equation="IF(@IS_POSITION()) THEN (IF (@IS_ZERO(${o:Position}) || @IS_NAN(${o:GenericInstrField(field='THEO/Effective Duration')})) THEN 0 ELSE ${o:GenericInstrField(field='THEO/Effective Duration')}) ELSE @WEIGHTED_SUM_OF_CHILDREN(THIS, ${o:ExposurePos})" parameters_exclude="hidden"/>
<output id="o:THEOConvRW" name="Eff Cnvx (Pos) RW" type="ratio" src="CustomEquation" equation="IF(@IS_POSITION()) THEN (IF (@IS_ZERO(${o:Position}) || @IS_NAN(${o:GenericInstrField(field='THEO/Effective Convexity')})) THEN 0 ELSE ${o:GenericInstrField(field='THEO/Effective Convexity')}) ELSE @WEIGHTED_SUM_OF_CHILDREN(THIS, ${o:ExposurePos})" parameters_exclude="hidden"/>
<output id="o:MyTheoEffectiveDur" name="TheoEffectiveDur" type="value" src="CustomEquation" equation="${o:GenericInstrField(field='THEO/Effective Duration')}" parameters="currency" parameters_exclude="hidden"/>
<output id="o:ExposurePosDur" name="Exposure Eff Dur (Pos)" type="value" src="CustomEquation" equation="IF(@IS_POSITION()) THEN (IF((${o:AssetType})=='MBS/ABS') THEN ${o:Value} ELSE (IF((${o:AssetType})=='Inflation Linked') THEN ${o:Value} ELSE IF(@IS_ZERO(${o:GenericInstrField(field='THEO/Effective Duration')}))THEN 0 ELSE (${o:THEOExposurePos} * ${o:Position} * ${o:InstrFX}/ ${o:PosUnitCalcToDisplayMultiplier}))) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden"/>
<output id="o:THEODur2" name="Eff Dur (Pos) 2" type="ratio" src="CustomEquation" equation="IF(@IS_POSITION()) THEN (IF (@IS_ZERO(${o:Position}) || @IS_NAN(${o:GenericInstrField(field='THEO/Effective Duration')})) THEN 0 ELSE ${o:GenericInstrField(field='THEO/Effective Duration')}) ELSE @WEIGHTED_SUM_OF_CHILDREN(THIS, ${o:ExposurePosDur})" parameters_exclude="hidden" />
<output id="o:MyTheoEffectiveCnvx" name="TheoEffectiveCnvx" type="value" src="CustomEquation" equation="${o:GenericInstrField(field='THEO/Effective Convexity')}" parameters="currency" parameters_exclude="hidden"/>
<output id="o:ExposurePosCnvx" name="Exposure Eff Cnvx (Pos)" type="value" src="CustomEquation" equation="IF(@IS_POSITION()) THEN (IF((${o:AssetType})=='MBS/ABS') THEN ${o:Value} ELSE (IF((${o:AssetType})=='Inflation Linked') THEN ${o:Value} ELSE IF(@IS_ZERO(${o:GenericInstrField(field='THEO/Effective Convexity')}))THEN 0 ELSE (${o:THEOExposurePos} * ${o:Position} * ${o:InstrFX}/ ${o:PosUnitCalcToDisplayMultiplier}))) ELSE @SUM_OF_CHILDREN(THIS)" parameters="currency" parameters_exclude="hidden"/>
<output id="o:THEOCnvx2" name="Eff Cnvx (Pos) 2" type="ratio" src="CustomEquation" equation="IF(@IS_POSITION()) THEN (IF (@IS_ZERO(${o:Position}) || @IS_NAN(${o:GenericInstrField(field='THEO/Effective Convexity')})) THEN 0 ELSE ${o:GenericInstrField(field='THEO/Effective Convexity')}) ELSE @WEIGHTED_SUM_OF_CHILDREN(THIS, ${o:ExposurePosCnvx})" parameters_exclude="hidden" />
<output id="o:az_callFlag" name="Call Flag" type="text" src="InstrField" field="CallOption" />
<output id="o:az_forwardYield" name="Forward Yield" type="value" src="InstrField" field="ForwardYield" />
<output id="o:az_term" name="Term" type="text" src="InstrField" field="Term" />
<output id="o:az_tenor" name="Tenor" type="value" src="InstrField" field="Tenor" />
<output id="o:az_underlyingValue" name="Underlying Value" type="value" src="InstrField" field="UnderlyingValue" />
<output id="o:az_conversionFactor" name="Conversion Factor" type="value" src="InstrField" field="ConversionFactor" />
<output id="o:az_AIMFISectorCode" name="AIM FI Sector Code" type="text" src="InstrField" field="USER_DEFINED_12"/>
<output id="o:az_IDSInvestmentTypeCode" name="IDS Investment Type Code" type="text" src="InstrField" field="USER_DEFINED_13"/>
<output id="o:az_callableflag" name="Callable Flag" type="text" src="InstrField" field="USER_DEFINED_14"/>
[\code]