The worker code for the pricing engine is available in the project example folder at: https://github.com/awslabs/aws-htc-grid/tree/main/examples/workloads/python/quant_lib
The entry-point for the engine is available in the portfolio_pricing_engine.py lines 28 to 34:
|
|
For those familiar with AWS Lambda service, you can see the interface is exactly the same. In this case the pricing engine is expecting a file similar to the one provided in the example sample_portfolio.json. The json file defines a vector of (a simplification of) Option trades and the engine they should be priced with.
|
|
As you can see in the worker code, the worker will take this vector of trade definitions and start running one by one the valuations, storing the results in the result vector. The result vector will be ultimately serialized and sent over the data plane for the client to retrieve the results.
The directory where the engine is deployed has a few extra files:
make
machinery to help with the build of different HTC-Grid Artifacts. In this case to build up the components of this example.