kellycriterion

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct{}

API kelly criterion

func (API) Simulate

func (API) Simulate(c *gin.Context)

Simulate /api/kelly-criterion/simulate @Summary Simulator for Kelly criterion. @Description Simulator for Kelly criterion. Kelly Criterion is a formula for sizing bets or investments from which the investor expects a positive return. @Tags Analytic @Accept json @Produce json,xml @Param "" body Request true "Request JSON" @Success 200 {object} data.APIResponse @Failure 400 {object} data.APIResponse @Router /api/kelly-criterion/simulate [post]

type Request

type Request struct {
	MaxWinChancePayout float64 `json:"maxWinChancePayout" xml:"maxWinChancePayout" form:"maxWinChancePayout" binding:"required"`
	MaxWinChance       float64 `json:"maxWinChance" xml:"maxWinChance" form:"maxWinChance" binding:"required"`
}

Request /api/kelly-criterion/simulate request

type Response

type Response struct {
	Payout float64
	Chance float64
	Factor float64
}

Response /api/kelly-criterion/simulate response. Response will be a slice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL