Skip to content

Commit

Permalink
arbit: Reduce quantity impact factor for profitability
Browse files Browse the repository at this point in the history
Basically give more weight to a couple of playsets worth of cards
instead of unbounded amounts.
  • Loading branch information
kodawah committed Jun 1, 2024
1 parent a0c1aa9 commit b3e3242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mtgban/arbit.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func Arbit(opts *ArbitOpts, vendor Vendor, seller Seller) (result []ArbitEntry,

profitability := (difference / (price + profitabilityConstant)) * math.Log(1+spread)
if qty > 1 {
profitability *= math.Sqrt(float64(qty))
profitability *= math.Pow(float64(qty), 0.25)
}

if profitability < minProfitability {
Expand Down Expand Up @@ -595,7 +595,7 @@ func Mismatch(opts *ArbitOpts, reference Seller, probe Seller) (result []ArbitEn

profitability := (difference / (price + profitabilityConstant)) * math.Log(1+spread)
if qty > 1 {
profitability *= math.Sqrt(float64(qty))
profitability *= math.Pow(float64(qty), 0.25)
}

if profitability < minProfitability {
Expand Down

0 comments on commit b3e3242

Please sign in to comment.