Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
projectedcrossassetmodel.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file models/projectedcrossassetmodel.hpp
20 \brief cross asset model projection utils
21 \ingroup crossassetmodel
22*/
23
24#pragma once
25
27
28namespace QuantExt {
29
30/* Input is a "big" model from which we select components to build a "small" model.
31 The projectedStateProcessIndices vector size is the number of state variables of the small model and maps
32 a state process component index of the small model to the corresponding index of the big model. */
33QuantLib::ext::shared_ptr<CrossAssetModel>
34getProjectedCrossAssetModel(const QuantLib::ext::shared_ptr<CrossAssetModel>& model,
35 const std::vector<std::pair<CrossAssetModel::AssetType, Size>>& selectedComponents,
36 std::vector<Size>& projectedStateProcessIndices);
37
38/* Input is a "big" and a "small" (projected) model, where the small model's components are assumed to be a subset of
39 the big model's components. The result is a vector of size equal to the number of state variables of the small model.
40 Each state process component index of the small model is mapped to the corresponding index of the big model. */
41std::vector<Size> getStateProcessProjection(const QuantLib::ext::shared_ptr<CrossAssetModel>& model,
42 const QuantLib::ext::shared_ptr<CrossAssetModel>& projectedModel);
43
44} // namespace QuantExt
cross asset model
QuantLib::ext::shared_ptr< CrossAssetModel > getProjectedCrossAssetModel(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, const std::vector< std::pair< CrossAssetModel::AssetType, Size > > &selectedComponents, std::vector< Size > &projectedStateProcessIndices)
std::vector< Size > getStateProcessProjection(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, const QuantLib::ext::shared_ptr< CrossAssetModel > &projectedModel)