benchmark_utils
Utils functions from benchmark purpouses.
Authors: Alberto Pedro Manzano Herrero & Gonzalo Ferro
- QQuantLib.utils.benchmark_utils.combination_for_dictionary(input_dict)
Creates a list of dictionaries with all the posible combination of the input dictionary.
- Parameters:
input_dict (python dictionary) – python dictionary where each key value MUST be a list. For each value of a list a new dictioanry will be created
- Returns:
list_of_dictionaries – A list with all posible combination of dictionaries from the input dictionary
- Return type:
list of python dictionaries
- QQuantLib.utils.benchmark_utils.combination_for_list(input_list)
For each dictionary of the list the function creates all posible combinations. All the posible combinations are concatenated.
- Parameters:
input_list (list of python dictionary) – The values of each key of the each python dictionary MUST BE lists.
- Returns:
list_of_combinations – A list with the concatenation of all posible combinations for each dictionary of the input_list
- Return type:
list of python dictionaries
- QQuantLib.utils.benchmark_utils.create_ae_pe_solution(ae_list, problem_list)
Creates a list of price estimation problems for solving with amplitude estimation (AE) techniques. Each element will have the complete information for generating a price estimation problem and the configuration for solving it using an AE algorithm. This is each element is a python dictionary that allows define a price estimation problem and solving it using a properly configure AE algorithm
- Parameters:
ae_list (list) – List with properly configured AE solvers.
problem_list (list) – List with different price estimation problems.
- Returns:
solve_ae_pe_list – List where each element is a ae_pricep dictionary The list will have the combination of each posible amplitude estimation solver with all posible price problem list
- Return type:
list
- QQuantLib.utils.benchmark_utils.create_pe_problem(domain_cfg, payoff_cfg, density_cfg)
Create a list of price estimation problems. Each element is a python dictionary with a complete option price estimation problem.
- Parameters:
domain_cfg (list of dictionaries) – Each dictionary has a domain configuration for a price estimation problem.
payoffs_cfg (list of dictionaries) – Each dictionary has an option configuration for a price estimation problem.
density_cfg (list of dictionaries) – Each dictionary has probability density configuration for a price estimation problem.
- Returns:
pe_problem_list – list with different price estimation problems.
- Return type:
list of dictionaries
- QQuantLib.utils.benchmark_utils.list_of_dicts_from_jsons(ae_json_list)
Creates a list of dictionaries from inputs jsons.
- Parameters:
ae_list (list of json.) – List with name of json files with a complete configuration of an amplitude estimation method
- Returns:
ae_pricep_list
- Return type:
list of python dictionaries