What is "Calculator"
- Tuesday, September 27 2022
- Contributed by: Takeshi Miyaoka
- Views: 2,351

how to use
Here's how to get the traded price in the market:
Specify "get_value" for "method". You can specify the key of this page for "key". "days" will get the data of the past date by the specified number. However, data for Saturday and Sunday are not available. "days" can be set from 1 to 999.
request json
{ "CustomerIdentifier": "
<your CustomerIdentifier>", "method": "get_value", "key": "JPY=X", "days": "2" }
response json
{
"result": {
"code": 200,
"message": "ok"
},
"data": [
{
"day": "2022-09-26T00:00:00",
"open": 143.511002,
"high": 144.485992,
"low": 143.438004,
"close": 143.511002,
"adj_close": 143.511002
},
{
"day": "2022-09-27T00:00:00",
"open": 144.677994,
"high": 144.737,
"low": 144.029999,
"close": 144.406998,
"adj_close": 144.406998
}
]
}
Here's how to get the historical volatility:
Specify "get_hv" for "method". You can specify the key of this page for "key". "days" will get the data of the past date by the specified number. However, data for Saturday and Sunday are not available. "days" can be set from 1 to 999.
request json
{ "CustomerIdentifier": "
<your CustomerIdentifier>", "method": "get_hv", "key": "GBPJPY=X", "days": "30" }
response json
{
"result": {
"code": 200,
"message": "ok"
},
"current_val": 160.975006,
"hv": 0.03472269220574874
}
Here's how to get the latest trends in historical volatility:
Specify "get_hv_trend" for "method". You can specify the key of this page for "key". You can examine trends in recent volatility changes. If the return value is "low", it means that the recent change is small. Conversely, 'high' indicates that recent changes have been large and the risk is high.You can examine trends in recent volatility changes. If the return value is "low", it means that the recent change is small. Conversely, 'high' indicates that recent changes have been large and the risk is high. "diff" means the difference in volatility values, and the larger the value, the greater the degree of trend.
request json
{ "CustomerIdentifier": "
<your CustomerIdentifier>", "method": "get_hv_trend", "key": "GC=F" }
response json
{
"result": {
"code": 200,
"message": "ok"
},
"trend": "low",
"diff": 0.04700755941821144
}
Here's how to use Monte Carlo simulation:
Specify "get_simulation_value" for "method". You can specify the key of this page for "key". For "days", specify the number of future days from now. If you specify 30, it means to expect the state after 30 days. "days" can be set from 1 to 999. In a Monte Carlo simulation, you can run 10000 simulations and calculate the maximum and minimum values that occur with a probability of 1%.
request json
{ "CustomerIdentifier": "
<your CustomerIdentifier>", "method": "get_simulation_value", "key": "EUR=X", "days": "30" }
response json
{
"result": {
"code": 200,
"message": "ok"
},
"current_val": 1.0415,
"hv": 0.08554991346362756,
"max_sim_val": 1.1011027722527091,
"min_sim_val": 0.9842194275515835
}
Here's how to get the correlation between two market traded prices:
Specify "get_correlation" for "method". The closer the calculated value is to 1, the more correlation there is between the two. On the other hand, the closer it is to -1, the more inverse the correlation is.
request json
{ "CustomerIdentifier": "
<your CustomerIdentifier>", "method": "get_correlation", "key1": "CL=F", "key2": "BZ=F" }
response json
{
"result": {
"code": 200,
"message": "ok"
},
"correlation": 0.98817235
}