forked from amazingfate/loongoffice
191 lines
6.6 KiB
Plaintext
191 lines
6.6 KiB
Plaintext
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
*/
|
|
|
|
#include "pricing.hrc"
|
|
|
|
// function and parameter description
|
|
StringArray PRICING_FUNCDESC_OptBarrier
|
|
{
|
|
ItemList [ en-US ] =
|
|
{
|
|
< "Pricing of a barrier option"; > ;
|
|
< "spot"; > ;
|
|
< "Price/value of the underlying asset"; > ;
|
|
< "vol"; > ;
|
|
< "Annual volatility of the underlying asset"; > ;
|
|
< "r"; > ;
|
|
< "Interest rate (continuously compounded)"; > ;
|
|
< "rf"; > ;
|
|
< "Foreign interest rate (continuously compounded)"; > ;
|
|
< "T"; > ;
|
|
< "Time to maturity of the option in years"; > ;
|
|
< "strike"; > ;
|
|
< "Strike level of the option"; > ;
|
|
< "barrier_low"; > ;
|
|
< "Lower barrier (set to 0 for no lower barrier)"; > ;
|
|
< "barrier_up"; > ;
|
|
< "Upper barrier (set to 0 for no upper barrier)"; > ;
|
|
< "rebate"; > ;
|
|
< "Amount of money paid at maturity if barrier was hit"; > ;
|
|
< "put/call"; > ;
|
|
< "String to define if the option is a (p)ut or a (c)all"; > ;
|
|
< "knock in/out"; > ;
|
|
< "String to define if the option is of type knock-(i)n or knock-(o)ut"; > ;
|
|
< "barrier_type"; > ;
|
|
< "String to define whether the barrier is observed (c)ontinuously or only at the (e)nd/maturity"; > ;
|
|
< "greek"; > ;
|
|
< "Optional parameter, if left out then the function simply returns the option price; if set, the function returns price sensitivities (Greeks) to one of the input parameters; possible values are (d)elta, (g)amma, (t)heta, v(e)ga, v(o)lga, v(a)nna, (r)ho, rho(f)"; > ;
|
|
};
|
|
};
|
|
|
|
StringArray PRICING_FUNCDESC_OptTouch
|
|
{
|
|
ItemList [ en-US ] =
|
|
{
|
|
< "Pricing of a touch/no-touch option"; > ;
|
|
< "spot"; > ;
|
|
< "Price/value of the underlying asset"; > ;
|
|
< "vol"; > ;
|
|
< "Annual volatility of the underlying asset"; > ;
|
|
< "r"; > ;
|
|
< "Interest rate (continuously compounded)"; > ;
|
|
< "rf"; > ;
|
|
< "Foreign interest rate (continuously compounded)"; > ;
|
|
< "T"; > ;
|
|
< "Time to maturity of the option in years"; > ;
|
|
< "barrier_low"; > ;
|
|
< "Lower barrier (set to 0 for no lower barrier)"; > ;
|
|
< "barrier_up"; > ;
|
|
< "Upper barrier (set to 0 for no upper barrier)"; > ;
|
|
< "foreign/domestic"; > ;
|
|
< "String to define if the option pays one unit of (d)omestic currency (cash or nothing) or (f)oreign currency (asset or nothing)"; > ;
|
|
< "knock in/out"; > ;
|
|
< "String to define if the option is of type knock-(i)n (touch) or knock-(o)ut (no-touch)"; > ;
|
|
< "barrier_type"; > ;
|
|
< "String to define whether the barrier is observed (c)ontinuously or only at the (e)nd/maturity"; > ;
|
|
< "greek"; > ;
|
|
< "Optional parameter, if left out then the function simply returns the option price; if set, the function returns price sensitivities (Greeks) to one of the input parameters; possible values are (d)elta, (g)amma, (t)heta, v(e)ga, v(o)lga, v(a)nna, (r)ho, rho(f)"; > ;
|
|
};
|
|
};
|
|
|
|
StringArray PRICING_FUNCDESC_OptProbHit
|
|
{
|
|
ItemList [ en-US ] =
|
|
{
|
|
< "Probability that an asset hits a barrier assuming it follows dS/S = mu dt + vol dW"; > ;
|
|
< "spot"; > ;
|
|
< "Price/value S of the underlying asset"; > ;
|
|
< "vol"; > ;
|
|
< "Annual volatility of the underlying asset"; > ;
|
|
< "drift"; > ;
|
|
< "Parameter mu in dS/S = mu dt + vol dW"; > ;
|
|
< "T"; > ;
|
|
< "Time to maturity"; > ;
|
|
< "barrier_low"; > ;
|
|
< "Lower barrier (set to 0 for no lower barrier)"; > ;
|
|
< "barrier_up"; > ;
|
|
< "Upper barrier (set to 0 for no upper barrier)"; > ;
|
|
};
|
|
};
|
|
|
|
StringArray PRICING_FUNCDESC_OptProbInMoney
|
|
{
|
|
ItemList [ en-US ] =
|
|
{
|
|
< "Probability that an asset will at maturity end up between two barrier levels, assuming it follows dS/S = mu dt + vol dW (if the last two optional parameters (strike, put/call) are specified, the probability of S_T in [strike, upper barrier] for a call and S_T in [lower barrier, strike] for a put will be returned)"; > ;
|
|
< "spot"; > ;
|
|
< "Price/value of the asset"; > ;
|
|
< "vol"; > ;
|
|
< "Annual volatility of the asset"; > ;
|
|
< "drift"; > ;
|
|
< "Parameter mu from dS/S = mu dt + vol dW"; > ;
|
|
< "T"; > ;
|
|
< "Time to maturity in years"; > ;
|
|
< "barrier_low"; > ;
|
|
< "Lower barrier (set to 0 for no lower barrier)"; > ;
|
|
< "barrier_up"; > ;
|
|
< "Upper barrier (set to 0 for no upper barrier)"; > ;
|
|
< "put/call"; > ;
|
|
< "Optional (p)ut/(c)all indicator"; > ;
|
|
< "strike"; > ;
|
|
< "Optional strike level"; > ;
|
|
};
|
|
};
|
|
|
|
// function names as accessible from cells
|
|
|
|
String PRICING_FUNCNAME_OptBarrier
|
|
{
|
|
Text [ en-US ] = "OPT_BARRIER";
|
|
};
|
|
|
|
String PRICING_FUNCNAME_OptTouch
|
|
{
|
|
Text [ en-US ] = "OPT_TOUCH";
|
|
};
|
|
|
|
String PRICING_FUNCNAME_OptProbHit
|
|
{
|
|
Text [ en-US ] = "OPT_PROB_HIT";
|
|
};
|
|
|
|
String PRICING_FUNCNAME_OptProbInMoney
|
|
{
|
|
Text [ en-US ] = "OPT_PROB_INMONEY";
|
|
};
|
|
|
|
// These were originally meant to be able to load Excel documents that for
|
|
// some time were stored with localized function names.
|
|
// This is not relevant to this add-in, so we only supply the same
|
|
// (English) function names again.
|
|
// see also: GetExcelName() or GetCompNames() or getCompatibilityNames()
|
|
StringArray PRICING_DEFFUNCNAME_OptBarrier
|
|
{
|
|
ItemList =
|
|
{
|
|
< "OPT_BARRIER"; >;
|
|
};
|
|
};
|
|
|
|
StringArray PRICING_DEFFUNCNAME_OptTouch
|
|
{
|
|
ItemList =
|
|
{
|
|
< "OPT_TOUCH"; >;
|
|
};
|
|
};
|
|
|
|
StringArray PRICING_DEFFUNCNAME_OptProbHit
|
|
{
|
|
ItemList =
|
|
{
|
|
< "OPT_PROB_HIT"; >;
|
|
};
|
|
};
|
|
|
|
StringArray PRICING_DEFFUNCNAME_OptProbInMoney
|
|
{
|
|
ItemList =
|
|
{
|
|
< "OPT_PROB_INMONEY"; >;
|
|
};
|
|
};
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|