Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DVampire/FinAgent
/ dynamic_programming.py
File
dynamic_programming.py
finagent/trajectory/dynamic_programming.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
import
numpy
as
np
2
3
""
"
4
Given an array of prices, an initial cash, and a fee_ratio, there are three states BUY, SELL, and HOLD when you buy and sell.
Callers
nothing calls this directly
Calls
4
max_profit_with_actions
Function · 0.70
buy
Function · 0.70
sell
Function · 0.70
noop
Function · 0.70
Tested by
no test coverage detected