Circuit of the month Oct 21 - option pricing shortfall

Mira Gross
Developer
Topics
Date
01 Oct 2021
Share this article
Topics
Date
31 March 2022
Our Library
Share this article

 

概要

Our October '21 circuit of the month calculates the expected shortfall for a financial option. When performing financial risk analysis, one may be interested in calculating the conditional value at risk, which is also known as the expected shortfall.


{
    "qubit_count": 10,
    "max_depth":200,
    "draw_as_functions": false,
    "logic_flow": [
        {
            "function": "Finance",
            "function_params": {
                "model": {
                    "name": "gaussian",
                    "params": {
                        "num_qubits":2,
                        "normal_max_value":2,
                        "default_probabilities":[0.15, 0.25],
                        "rhos":[0.1, 0.05],
                        "loss":[1, 2],
                        "min_loss":0
                    }
                },
                "finance_function": {
                      "f": "expected short fall",
                      "condition": {
                        "threshold": 2,
                        "larger": true
                      },
                      "tail_probability": 0.05
                    }
               
            }
                
        }
    
    ]
}

Available downloads

Possible modifications

There are many possible variations for this circuit. For instance, one could change the qubit count (line 2) and explore the tradeoff between depth and width. Clearly, one could also change the parameters of the gaussian (lines 11-16).

One could also change the finance function from "expected shortfall" to other functions. For instance, change to a European Call Option and generate any function using Chebyshev polynomial approximation:


{
"finance_function": {
    "f": "european call option",
    "condition": {
        "threshold":1.896,
        "larger": true
    },
    "polynomial_degree": 1,
    "use_chebyshev_polynomial_approximation": true
  }
}

 

References

  • Paul Glasserman, Monte Carlo Methods in Financial Engineering. Springer-Verlag New York, 2003, p. 596.
  • Gilles Brassard, Peter Hoyer, Michele Mosca, and Alain Tapp, Quantum Amplitude Amplification and Estimation. Contemporary Mathematics 305 (2002)
  • Woerner, S., Egger, D.J. Quantum risk analysis. npj Quantum Inf 5, 15 (2019).

 

Next month

What would you like to see in next month's circuit? Let us know using the 'Contact us' button on the top right.

 

The full circuit

The circuit that was generated, within a few seconds, by the Classiq Quantum Algorithm Design platform is below:

 

 

概要

Our October '21 circuit of the month calculates the expected shortfall for a financial option. When performing financial risk analysis, one may be interested in calculating the conditional value at risk, which is also known as the expected shortfall.


{
    "qubit_count": 10,
    "max_depth":200,
    "draw_as_functions": false,
    "logic_flow": [
        {
            "function": "Finance",
            "function_params": {
                "model": {
                    "name": "gaussian",
                    "params": {
                        "num_qubits":2,
                        "normal_max_value":2,
                        "default_probabilities":[0.15, 0.25],
                        "rhos":[0.1, 0.05],
                        "loss":[1, 2],
                        "min_loss":0
                    }
                },
                "finance_function": {
                      "f": "expected short fall",
                      "condition": {
                        "threshold": 2,
                        "larger": true
                      },
                      "tail_probability": 0.05
                    }
               
            }
                
        }
    
    ]
}

Available downloads

Possible modifications

There are many possible variations for this circuit. For instance, one could change the qubit count (line 2) and explore the tradeoff between depth and width. Clearly, one could also change the parameters of the gaussian (lines 11-16).

One could also change the finance function from "expected shortfall" to other functions. For instance, change to a European Call Option and generate any function using Chebyshev polynomial approximation:


{
"finance_function": {
    "f": "european call option",
    "condition": {
        "threshold":1.896,
        "larger": true
    },
    "polynomial_degree": 1,
    "use_chebyshev_polynomial_approximation": true
  }
}

 

References

  • Paul Glasserman, Monte Carlo Methods in Financial Engineering. Springer-Verlag New York, 2003, p. 596.
  • Gilles Brassard, Peter Hoyer, Michele Mosca, and Alain Tapp, Quantum Amplitude Amplification and Estimation. Contemporary Mathematics 305 (2002)
  • Woerner, S., Egger, D.J. Quantum risk analysis. npj Quantum Inf 5, 15 (2019).

 

Next month

What would you like to see in next month's circuit? Let us know using the 'Contact us' button on the top right.

 

The full circuit

The circuit that was generated, within a few seconds, by the Classiq Quantum Algorithm Design platform is below:

 

量子ソフトウェア開発を開始