Skip to content

Commit 6eb08d4

Browse files
committed
Merge branch 'gh_179_180_182_183' into 'master'
GH PR 179, 180, 182, 183 See merge request qs/ore!57
2 parents 22d2f1b + fa00ee1 commit 6eb08d4

20 files changed

Lines changed: 146 additions & 33 deletions

.github/workflows/linux_build.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: master
6+
pull_request:
7+
branches: master
8+
types: [ready_for_review, opened, synchronize, reopened]
9+
paths:
10+
- .github/workflows/linux_build.yaml
11+
- ./App/**
12+
- ./OREAnalytics/**
13+
- '!./OREAnalytics/doc/**'
14+
- ./OREData/**
15+
- '!./OREData/doc/**'
16+
- ./ORETest/**
17+
- ./QuantExt/**
18+
- '!./QuantExt/doc/**'
19+
- CMakeLists.txt
20+
workflow_dispatch:
21+
22+
jobs:
23+
build:
24+
name: building
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: get QuantLib
29+
run: |
30+
git submodule update --init
31+
- name: Set up Boost
32+
run: |
33+
sudo apt update
34+
sudo apt install -y libboost-all-dev libboost-test-dev
35+
- name: cmake configure
36+
run : mkdir build; cd build; cmake -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 -G "Ninja" ..
37+
- name: cmake build
38+
run: cd build/; pwd; cmake --build . -j $(nproc)

CMakePresets.json

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": 2,
2+
"version": 3,
33
"configurePresets": [
44
{
55
"name": "windows-ninja-x64-debug",
@@ -146,6 +146,75 @@
146146
]
147147
}
148148
}
149+
},
150+
{
151+
"name": "linux-gcc-base",
152+
"hidden": true,
153+
"binaryDir": "${sourceDir}/build/${presetName}",
154+
"cacheVariables": {
155+
"CMAKE_CXX_COMPILER": "g++",
156+
"BOOST_ROOT": "$env{BOOST}",
157+
"QL_BUILD_EXAMPLES": false,
158+
"QL_BUILD_TEST_SUITE": false,
159+
"QL_BUILD_BENCHMARK": false,
160+
"QL_ENABLE_SESSIONS": true,
161+
"ORE_BUILD_DOC": false
162+
},
163+
"condition": {
164+
"type": "equals",
165+
"lhs": "${hostSystemName}",
166+
"rhs": "Linux"
167+
}
168+
},
169+
{
170+
"name": "_release",
171+
"hidden": true,
172+
"cacheVariables": {
173+
"CMAKE_BUILD_TYPE": "Release"
174+
}
175+
},
176+
{
177+
"name": "_debug",
178+
"hidden": true,
179+
"cacheVariables": {
180+
"CMAKE_BUILD_TYPE": "Debug"
181+
}
182+
},
183+
{
184+
"name": "_relwithdebinfo",
185+
"hidden": true,
186+
"cacheVariables": {
187+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
188+
}
189+
},
190+
{
191+
"name": "_ninja",
192+
"hidden": true,
193+
"generator": "Ninja"
194+
},
195+
{
196+
"name": "linux-gcc-ninja-debug",
197+
"inherits": [
198+
"linux-gcc-base",
199+
"_ninja",
200+
"_debug"
201+
]
202+
},
203+
{
204+
"name": "linux-gcc-ninja-release",
205+
"inherits": [
206+
"linux-gcc-base",
207+
"_ninja",
208+
"_release"
209+
]
210+
},
211+
{
212+
"name": "linux-gcc-ninja-relwithdebinfo",
213+
"inherits": [
214+
"linux-gcc-base",
215+
"_ninja",
216+
"_relwithdebinfo"
217+
]
149218
}
150219
],
151220
"buildPresets": [

Docs/UserGuide/allowablevalues.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ \subsection{Allowable Values}
192192
\emph{TH, THA, THB} & Thailand Calendar \\ \hline
193193
\emph{TR, TUR, TRY} & Turkey Calendar \\ \hline
194194
\emph{UA, UKR, UAH} & Ukraine Calendar \\ \hline
195+
\emph{XASX} & Australian Securities Exchange Calendar \\ \hline
195196
\emph{BVMF} & Brazil Bovespa Calendar \\ \hline
196197
\emph{XTSE} & Canada Toronto Stock Exchange Calendar \\ \hline
197198
\emph{XSHG} & China Shanghai Stock Exchange Calendar \\ \hline

Docs/UserGuide/tradecomponents/underlying.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ \subsubsection{Underlying}
223223
\item \lstinline!PriceType! [Optional]:
224224
Only valid when \lstinline!Type! is \emph{Commodity}. Whether the Spot or Future price is referenced.
225225

226-
Allowable values: \emph{Spot}, \emph{FutureSettlemment}. Mandatory when \lstinline!Type! is \emph{Commodity} .
226+
Allowable values: \emph{Spot}, \emph{FutureSettlement}. Mandatory when \lstinline!Type! is \emph{Commodity} .
227227

228228
\item \lstinline!FutureMonthOffset! [Optional]:
229-
Only valid when \lstinline!Type! is \emph{Commodity}. Only relevant for the \emph{FutureSettlemment} price type, in which case the the $N+1$th future with
229+
Only valid when \lstinline!Type! is \emph{Commodity}. Only relevant for the \emph{FutureSettlement} price type, in which case the the $N+1$th future with
230230
expiry greater than ObservationDate for the given commodity underlying will be referenced.
231231

232-
Allowable values: An integer. Mandatory for when \lstinline!Type! is \emph{Commodity} and \lstinline!PriceType! is \emph{FutureSettlemment}.
232+
Allowable values: An integer. Mandatory for when \lstinline!Type! is \emph{Commodity} and \lstinline!PriceType! is \emph{FutureSettlement}.
233233

234234
\item \lstinline!DeliveryRollDays! [Optional]:
235235
Only valid when \lstinline!Type! is \emph{Commodity}. The number of days the observation date is rolled forward before the

OREAnalytics/orea/app/marketdataloader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void additional_equity_fixings(map<string, set<Date>>& fixings, const TodaysMark
134134
indexDecomposition->addAdditionalFixingsForEquityIndexDecomposition(asof, fixings);
135135
}
136136
} catch (const std::exception& e) {
137-
ALOG("adding addtional equity fixing failed, " << e.what());
137+
ALOG("adding additional equity fixing failed, " << e.what());
138138
}
139139
}
140140
}
@@ -171,7 +171,7 @@ void MarketDataLoader::populateFixings(
171171
FixingMap portfolioFixings;
172172
std::map<std::pair<std::string, QuantLib::Date>, std::set<QuantLib::Date>> lastAvailableFixingLookupMap;
173173

174-
// portfolio fixings will warn if missinbg
174+
// portfolio fixings will warn if missing
175175
if (inputs_->portfolio()) {
176176
portfolioFixings = inputs_->portfolio()->fixings();
177177
LOG("The portfolio depends on fixings from " << portfolioFixings.size() << " indices");
@@ -237,7 +237,7 @@ void MarketDataLoader::populateLoader(
237237
QL_REQUIRE(!inputs_->curveConfigs().empty(), "Need at least one curve configuration to populate loader.");
238238
QL_REQUIRE(todaysMarketParameters.size() > 0, "No todaysMarketParams provided to populate market data loader.");
239239

240-
// for equitites check if we have corporate action data
240+
// for equities check if we have corporate action data
241241
std::map<std::string, std::string> equities;
242242
for (const auto& tmp : todaysMarketParameters) {
243243
if (tmp->hasMarketObject(MarketObject::EquityCurve)) {

OREData/ored/configuration/conventions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const boost::shared_ptr<ore::data::Conventions>& InstrumentConventions::conventi
8282
if (numberOfEmittedWarnings_ < max_num_warnings) {
8383
++numberOfEmittedWarnings_;
8484
WLOG("InstrumentConventions: Could not find conventions for "
85-
<< dt << ", using convetions from " << it->first
85+
<< dt << ", using conventions from " << it->first
8686
<< (numberOfEmittedWarnings_ == max_num_warnings ? " (no more warnings of this type will be emitted)"
8787
: ""));
8888
}

OREData/ored/portfolio/barrieroption.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ void BarrierOption::build(const boost::shared_ptr<EngineFactory>& engineFactory)
130130
barrier_.levels()[0].value(), barrier_.levels()[1].value(), rebate, payoff, exercise);
131131
}
132132

133-
boost::shared_ptr<QuantLib::PricingEngine> barrierEngine = barrierPricigingEngine(engineFactory, expiryDate, payDate);
134-
boost::shared_ptr<QuantLib::PricingEngine> vanillaEngine = vanillaPricigingEngine(engineFactory, expiryDate, payDate);
133+
boost::shared_ptr<QuantLib::PricingEngine> barrierEngine = barrierPricingEngine(engineFactory, expiryDate, payDate);
134+
boost::shared_ptr<QuantLib::PricingEngine> vanillaEngine = vanillaPricingEngine(engineFactory, expiryDate, payDate);
135135

136136
// set pricing engines
137137
barrier->setPricingEngine(barrierEngine);

OREData/ored/portfolio/barrieroption.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ class BarrierOption : virtual public ore::data::Trade {
6363
virtual QuantLib::Real tradeMultiplier() = 0;
6464
virtual Currency tradeCurrency() = 0;
6565
virtual boost::shared_ptr<QuantLib::PricingEngine>
66-
vanillaPricigingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
66+
vanillaPricingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
6767
const QuantLib::Date& paymentDate) = 0;
6868
virtual boost::shared_ptr<QuantLib::PricingEngine>
69-
barrierPricigingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
69+
barrierPricingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
7070
const QuantLib::Date& paymentDate) = 0;
7171
virtual const QuantLib::Handle<QuantLib::Quote>& spotQuote() = 0;
7272

OREData/ored/portfolio/equitybarrieroption.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void EquityBarrierOption::checkBarriers() {
2929
QL_REQUIRE(barrier().style().empty() || barrier().style() == "American", "Only american barrier style suppported");
3030
}
3131

32-
boost::shared_ptr<QuantLib::PricingEngine> EquityBarrierOption::vanillaPricigingEngine(const boost::shared_ptr<EngineFactory>& ef,
32+
boost::shared_ptr<QuantLib::PricingEngine> EquityBarrierOption::vanillaPricingEngine(const boost::shared_ptr<EngineFactory>& ef,
3333
const QuantLib::Date& expiryDate, const QuantLib::Date& paymentDate) {
3434

3535
boost::shared_ptr<EngineBuilder> builder = ef->builder("EquityOption");
@@ -43,7 +43,7 @@ boost::shared_ptr<QuantLib::PricingEngine> EquityBarrierOption::vanillaPriciging
4343
}
4444

4545
boost::shared_ptr<QuantLib::PricingEngine>
46-
EquityBarrierOption::barrierPricigingEngine(const boost::shared_ptr<EngineFactory>& ef,
46+
EquityBarrierOption::barrierPricingEngine(const boost::shared_ptr<EngineFactory>& ef,
4747
const QuantLib::Date& expiryDate, const QuantLib::Date& paymentDate) {
4848

4949
boost::shared_ptr<EngineBuilder> builder = ef->builder(tradeType_);

OREData/ored/portfolio/equitybarrieroption.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ class EquityBarrierOption : public EquityOptionWithBarrier {
5252

5353
//! create the pricing engines
5454
boost::shared_ptr<QuantLib::PricingEngine>
55-
vanillaPricigingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
55+
vanillaPricingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
5656
const QuantLib::Date& paymentDate = QuantLib::Date()) override;
5757
boost::shared_ptr<QuantLib::PricingEngine>
58-
barrierPricigingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
58+
barrierPricingEngine(const boost::shared_ptr<EngineFactory>& ef, const QuantLib::Date& expiryDate,
5959
const QuantLib::Date& paymentDate = QuantLib::Date()) override;
6060
};
6161

0 commit comments

Comments
 (0)