MCPcopy Create free account
hub / github.com/DVampire/FinAgent / sell

Function sell

finagent/trajectory/dynamic_programming_threshold.py:84–87  ·  view source on GitHub ↗
(cash, position, price, fee_ratio)

Source from the content-addressed store, hash-verified

82 return cash, position
83
84def sell(cash, position, price, fee_ratio):
85 cash += position * price * (1 - fee_ratio)
86 position = 0
87 return cash, position
88
89def noop(cash, position, price, fee_ratio):
90 return cash, position

Calls

no outgoing calls

Tested by

no test coverage detected