Giter Site home page Giter Site logo

market-simulator's Introduction

Market simulator

Market

[Fig. 1: Blue line is the price of the item over time. Green and orange are the dynamic boundaries of the price.]


Required libraries

  • matplotlib
  • scipy
  • numpy

Description

This Python script simulate a market, given the initial price of the product, the volatility of the market (constant), the max price, the min price of the product and other parameters, it generate the item price over time randomly. A dynamic border is created to model market cycles and to avoid prices droping too fast.

To use this script call the "continuousFunctionOfPricesOverTime" function with an float in argument and put visualize=False if you don't need the graph.

Usage case

  • You could use it if you want to implement a real market in your game and force players to sell their items at the right time !

Images

Over more time:

Market

[Fig. 2: Blue line is the price of the item over time. Green and orange are the dynamic boundaries of the price.]

With other periodic functions for dynamic borders :

Market

[Fig. 3: Blue line is the price of the item over time. Green and orange are the dynamic boundaries of the price.]

market-simulator's People

Contributors

multielio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.