This is a sample Python script that produce rebalancing position target for delta hedging, it only outputs a yaml file with target position information. It doesn't include anything related to order execution.

This is only for reference & informational purpose — NFA & please DYOR!

https://gist.github.com/zimrain/557fbfa79ba2dbe0566456c07d13b34f