供需模型
我想我应该请求 SO 社区帮助我完成我目前正在进行的一个项目。 我需要在市场情况下对小部件的价格进行建模。 小部件的价格应该是当前供求关系的结果。 用户将能够以固定价格购买和出售该小部件。 当用户购买该小部件时,需求将随着价格上升。 相反,当用户出售该小部件时,供应量将会增加,价格将会下降。 小部件的数量和当前价格以及小部件的购买和销售总数将存储在数据库中。
Protrade.com 有一个购买和交易小部件(玩家和团队)的绝佳示例,我想以类似的方式对我的系统进行建模。
是否有任何好的编程库可以根据供需准确地对市场进行建模?
I thought I would ask the SO community on helping me with a project that I am currently working on. I need to model the price for a widget in a market situation. The price for the widget should be a result from the current supply and demand. Users will be able to buy and sell the widget at the fixed price. As users buy the widget the demand will go up along with the price. Conversely as users sell the widget the supply will go up and the price will go down. The quantity and current price of the widget will be stored in a database along with the total number of buys and sells for the widget.
Protrade.com has an excellent example of buying and trading widgets (players and teams), I would want to model my system in a similar fashion.
Is there any good programming libraries that will accurately model a market based on supply and demand?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是我不知道有什么库,但也许你可以利用 Excel 的统计功能。
我的意见如下。
这就是为什么经济学如此无聊,一切都是供给/需求。
应该从以下内容开始:
其中经济因素是某个确定的常数。
如果您有一些历史数据,例如每日供需比,您可以将其考虑在内,也许使用一些基于时间的比例。
Unfortunately I do not know of any libraries, but perhaps you can tap into Excel's statistics functions.
My opinion follows.
This is why economics is so boring, everything is supply/demand.
Something along the lines of the following should work as a start:
where
economic-factor
is some determined constant.If you have some historical data, eg daily supply/demand ratio's you could factor it in, perhaps using some time-based scale.