Within Excel, a range such as this can be passed directly into the PayOffTable parameter.
| | | | | | |
|---|
| 19/Jul/2005 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jan/2006 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jul/2006 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jan/2007 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jul/2007 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jan/2008 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jul/2008 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jan/2009 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jul/2009 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jan/2010 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jul/2010 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
| 19/Jan/2011 | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) |
CTQL.CTRangeData GenericTreePricer_PayOffTable = new CTQL.CTRangeData();
System.Text.StringBuilder GenericTreePricer_PayOffTable_builder =
new System.Text.StringBuilder(100);
GenericTreePricer_PayOffTable_builder.Append("{");
GenericTreePricer_PayOffTable_builder.Append("#19/Jul/2005# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jan/2006# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jul/2006# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jan/2007# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jul/2007# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jan/2008# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jul/2008# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jan/2009# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jul/2009# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jan/2010# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jul/2010# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol)) ;");
GenericTreePricer_PayOffTable_builder.Append("#19/Jan/2011# | False | Asset(cRow) + 10pct | Interp1D(1,cRow) | GridRowSum(cRow, cCol-2, cCol-1) | max(Cell(cRow, cCol-1) - _var1, 0.0) | max(Cell(cRow, cCol-1), PVCol(cCol))");
GenericTreePricer_PayOffTable_builder.Append("}");
// Parse the string into the Range object.
GenericTreePricer_PayOffTable.RangeFromStr( GenericTreePricer_PayOffTable_builder.ToString() );