Git Product home page Git Product logo

rmg-odds's Introduction

RMG Technology (M) Sdn. Bhd. produces the software which powers the
BetOnMarkets.com fixed-odds financial betting platform.

BetOnMarkets clients purchase wagers on the movements of widely traded
financial instruments. These wagers are binary (or digital) options.
That is, if the predicted event occurs, the client receives the full
payout. Otherwise, they receive nothing.

The core of the business, then, is in determining the probability that
a particular event will occur. On the other hand, clients are concerned
with the odds on their stake and the potential return for a correct
wager.

This exercise is intended to bridge the gap between these two disparate
ways of presenting this information. The task is to produce an OO perl
module which, when constructed from a given probability, can produce
decimal odds and ROI suitable for display to a client.

An example:

my $oc = OddsConverter->new(probability => 0.5);
print $oc->decimal_odds;    # '2.00' (always 2 decimal places or 'Inf.')
print $oc->roi;             # '100%' (always whole numbers or 'Inf.')

You may find this Wikipedia article useful in understanding the concepts
involved: https://en.wikipedia.org/wiki/Fixed-odds_betting

We have provided a bare bones OddsConverter.pm. We have also included a
test suite in t/ to help ensure that your module operates properly. You
may create additional tests to verify your implementation, if you wish.
Please add any such tests in your own files under t/.

Please feel free to use any modules from CPAN to aid in the completion
of this project. We strongly encourage you to use modern perl
techniques. However, please be aware that many of our critical path
machines are on perl 5.10, so demonstrating an ability to work under
that constraint is a bonus.

rmg-odds's People

Contributors

viclim avatar

Watchers

 avatar  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.