Skip to content

Commit df5886f

Browse files
authored
Merge branch 'master' into upgrade-action-versions
2 parents 6180a55 + e6496d7 commit df5886f

50 files changed

Lines changed: 1040 additions & 316 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_windows.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: C/C++ CI Windows
33
on:
44
push:
55
branches: [master]
6+
tags:
7+
- 'v*'
68
release:
79
types: [published]
810
pull_request:
@@ -39,6 +41,16 @@ jobs:
3941
- name: get QuantLib
4042
run: |
4143
git submodule update --init
44+
- name: Set up zlib
45+
run: |
46+
$Url = "https://www.zlib.net/zlib131.zip"
47+
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\zlib.zip")
48+
Expand-Archive -Path "$env:TEMP\zlib.zip" -DestinationPath C:\local
49+
cd C:\local\zlib-1.3.1
50+
mkdir build
51+
cd build
52+
cmake ..
53+
cmake --build . --config Release
4254
- name: Set up Boost
4355
run: |
4456
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.72.0/binaries/boost_1_72_0-msvc-14.2-${{ matrix.boost-lib }}.exe"
@@ -52,11 +64,12 @@ jobs:
5264
run: |
5365
mkdir build
5466
cd build
67+
SET ZLIB_ROOT=C:\local\zlib-1.3.1
5568
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1
56-
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L
69+
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_USE_ZLIB=ON -DORE_BUILD_DOC=false -DBOOST_INCLUDEDIR=C:\local\boost -DZLIB_LIBRARY=C:\local\zlib-1.3.1\build\Release\zlib.lib -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L
5770
cmake --build . -j 2 --verbose
5871
- name: Save executables as artifacts
59-
#if: startsWith(github.ref, 'refs/tags/v')
72+
if: startsWith(github.ref, 'refs/tags/v')
6073
uses: actions/upload-artifact@v4
6174
with:
6275
name: ore-windows-${{ matrix.arch }}

.github/workflows/linux_build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: C/C++ CI Ubuntu
33
on:
44
push:
55
branches: [master]
6+
tags:
7+
- 'v*'
68
release:
79
types: [published]
810
pull_request:

.github/workflows/macos_ARM64_build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: C/C++ MacOS
33
on:
44
push:
55
branches: [master]
6+
tags:
7+
- 'v*'
68
release:
79
types: [published]
810
pull_request:

Docs/ScriptedTrade/docs/language.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@
466466
\item here $P_{ccy}$ is the discount factor in currency ccy, $FX$ is the FX spot from ccy to base and $N$ is the model
467467
numeraire
468468
\item $d\leq p$ must hold
469-
\item if $p$ lies on or before the evaluation date, the result is zero; $X$ is not evaluated in this case
469+
\item if $p$ lies on or before the evaluation date, the result is zero; $X$ is not evaluated in this case.
470+
Note that $X$ is evaluated in the LOGPAY function if past cashflows are included, see \ref{function_logpay}.
470471
\item avoids reading non-relevant past fixings from the index history
471472
\item if $d$ lies before (but $p$ after) the evaluation date, it is set to the evaluation date, i.e. the result is
472473
computed as of the evaluation date
@@ -514,6 +515,9 @@
514515
under leg number $2$ and flow Type ``Interest''. The same holds for Payoff3, but if any amounts were booked using the
515516
slot parameter $3$ previously they will be overwritten with the current amount.
516517

518+
Note: If IncludePastCashflows in the pricing engine config is set to true then even if $p$ lies on or before the
519+
evaluation date, a cashflow entry will be generated.
520+
517521
% ====================================================
518522
\stsubsection{Function {\tt NPV, NPVMEM}}\label{function_npv}
519523
% ====================================================

Docs/ScriptedTrade/docs/models.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ \subsection{Pricing Engine Configuration}\label{pricingengine_config}
4949
<Parameter name="TimeStepsPerYear">24</Parameter>
5050
<Parameter name="Interactive">false</Parameter>
5151
<Parameter name="BootstrapTolerance">0.1</Parameter>
52+
<Parameter name="IncludePastCashflows">true</Parameter>
5253
<!-- product specific parameters -->
5354
<Parameter name="RegressionOrder_SingleAssetOption(EQ)">6</Parameter>
5455
<Parameter name="RegressionOrder_SingleAssetOption(FX)">6</Parameter>
@@ -136,6 +137,8 @@ \subsection{Pricing Engine Configuration}\label{pricingengine_config}
136137
only. The moneyness is defined as a ``standardised moneyness'' $\ln(K/F) / \sigma\sqrt{t}$ with $K$ strike, $F$ ATMF
137138
forward, $\sigma$ ATMF market vol, $t$ option time to expiry
138139
\item BootstrapTolerance: tolerance for calibration bootstrap, only applies to model = GaussianCam
140+
\item IncludePastCashflows: if true, LOGPAY() will generate cashflow information for pay dates on or before the
141+
reference date. Optional, defaults to false.
139142
\item Interactive: If true an interactive session is started on script execution for debugging purposes; should be false
140143
except for debugging purposes
141144
\item UseAD: If true and RunType in the global pricing engine parameters is SensitivityDelta, a first order pnl

Docs/UserGuide/userguide.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,6 +3920,7 @@ \subsubsection{Analytics}\label{sec:analytics}
39203920
<Parameter name="baseCurrency">EUR</Parameter>
39213921
<Parameter name="outputFileName">npv.csv</Parameter>
39223922
<Parameter name="additionalResults">Y</Parameter>
3923+
<Parameter name="additionalResultsReportPrecision">6</Parameter>
39233924
</Analytic>
39243925
<Analytic type="cashflow">
39253926
<Parameter name="active">Y</Parameter>

Examples/Example_1/Input/ore.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<Parameter name="baseCurrency">EUR</Parameter>
3333
<Parameter name="outputFileName">npv.csv</Parameter>
3434
<Parameter name="additionalResults">Y</Parameter>
35+
<Parameter name="additionalResultsReportPrecision">12</Parameter>
3536
</Analytic>
3637
<Analytic type="cashflow">
3738
<Parameter name="active">Y</Parameter>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#TradeId,TradeType,Maturity,MaturityTime,NPV,NpvCurrency,NPV(Base),BaseCurrency,Notional,NotionalCurrency,Notional(Base),NettingSet,CounterParty
22
BermSwp,ScriptedTrade,2036-03-03,20.073770,51640.311738,EUR,51640.311738,EUR,#N/A,#N/A,#N/A,CPTY_A,CPTY_A
3-
LPISwp,ScriptedTrade,2035-02-01,18.989303,62979.404029,GBP,78301.934721,EUR,#N/A,#N/A,#N/A,CPTY_B,CPTY_B
3+
LPISwp,ScriptedTrade,2035-02-01,18.989303,53833.516084,GBP,66930.904274,EUR,#N/A,#N/A,#N/A,CPTY_B,CPTY_B

Examples/Example_54/Input/pricingengine.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88
<Parameter name="EnforceBaseCcy">false</Parameter>
99
<Parameter name="GridCoarsening">3M(1W),1Y(1M),5Y(3M),10Y(1Y),50Y(5Y)</Parameter>
1010
<Parameter name="IrReversion_EUR">0.01</Parameter>
11-
<Parameter name="IrReversion_GBP">0.01</Parameter>
11+
<Parameter name="IrReversion_GBP">0.015</Parameter>
1212
<Parameter name="FullDynamicFx">true</Parameter>
1313
<Parameter name="FullDynamicIr">true</Parameter>
1414
<!-- DK or JY -->
1515
<Parameter name="InfModelType">JY</Parameter>
16+
<!-- explicit overwrite of cam correlations -->
17+
<Parameter name="Correlation_IR:GBP_INF:UKRPI:0">0.8</Parameter>
18+
<Parameter name="Correlation_IR:GBP_INF:UKRPI:1">0.6</Parameter>
19+
<Parameter name="Correlation_INF:UKRPI:0_INF:UKRPI:1">0.3</Parameter>
20+
<!-- real to nominal rate vol ratio in jy model -->
21+
<Parameter name="InfJyRealToNominalVolRatio">0.6</Parameter>
1622
</ModelParameters>
1723
<Engine>Generic</Engine>
1824
<EngineParameters>

Examples/Example_54/run.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
sys.path.append('../')
66
from ore_examples_helper import OreExample
77

8-
samples1=os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"]
9-
print("samples1 =", samples1)
10-
os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"]=""
11-
samples2=os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"]
12-
print("samples2 =", samples2)
8+
if "OVERWRITE_SCENARIOGENERATOR_SAMPLES" in os.environ:
9+
backupSamples = os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"]
10+
os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"] = ""
1311

1412
oreex = OreExample(sys.argv[1] if len(sys.argv)>1 else False)
1513

@@ -41,4 +39,5 @@
4139
oreex.decorate_plot(title="Example Scripting / AMC - DIM Evolution for LPI Swap (sticky date mpor mode)")
4240
oreex.save_plot_to_file()
4341

44-
os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"]=samples1
42+
if "OVERWRITE_SCENARIOGENERATOR_SAMPLES" in os.environ:
43+
os.environ["OVERWRITE_SCENARIOGENERATOR_SAMPLES"] = backupSamples

0 commit comments

Comments
 (0)