Skip to content

Conversation

@potrue
Copy link
Owner

@potrue potrue commented Aug 6, 2025

}
return profit;
}
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

読みやすいです。


## 最終コード

iを0からprices.size() - 1まで回して、prices[i+1]とprices[i]の差を測るのも考えたが、個人的に未来の価格を見るというのはちょっとだけ直感的に違和感があったのでこちらにした。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未来の価格を見られるとしたら、という観点で株の売買戦略を最適化するというのは、株式の売買モデルを作る文脈だとあるかもしれませんね。少なくとも理論上の最大利益を求められると、一応ベンチマーク (どんなモデルも絶対にそれを超えないという意味で) ができるので、作ったモデルが変な挙動していないかわかるかもしれません。

(大学院の授業で上のようなことをやりましたが、そっち方面の専門家ではないのでどれくらい現実で価値があるのかはわかりませんので遊び程度の話として)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants