Update trade listings
This commit is contained in:
+42
-31
@@ -1,37 +1,48 @@
|
|||||||
# Market evidence from trades.csv
|
# Provisional relative ValueList
|
||||||
|
|
||||||
`trades.csv` contains asking listings. Its `offer` column is often an entire
|
Run `py -B provisional_valuelist.py` to regenerate:
|
||||||
inventory, while `lf` and `mlf` can contain several alternatives. Pairing all
|
|
||||||
items across those columns would invent exchange rates that nobody quoted.
|
|
||||||
|
|
||||||
Run `py -B extract_exchange_quotes.py` to regenerate `exchange_quotes.csv`.
|
- `provisional_valuelist.csv`: ranked relative estimates and confidence levels.
|
||||||
This reads only exact unit-for-unit proposals: a single offered variant and a
|
- `exchange_quotes.csv`: exact single-unit asking quotes with source text.
|
||||||
single requested variant, with optional explicit quantities. It rejects
|
- `bundle_quotes.csv`: explicit multi-unit asking quotes with source text.
|
||||||
bundles, adds, alternatives, and quality descriptions. It also requires the
|
|
||||||
offered variant to appear in that listing's `offer` field and counts identical
|
|
||||||
quotes from an author once. The CSV keeps the source row and text for review.
|
|
||||||
|
|
||||||
The current 835 listings yield 11 such asking quotes. They connect only small
|
The current snapshot contains 886 listings. The parser found 11 simple quotes
|
||||||
groups of units, and each relation has too few independent quotes to claim a
|
and 11 bundle quotes. Seventeen quotes connect 24 variants to Aizen Evo; only
|
||||||
market price. For example, one seller asks for five Dark Mage Evo in exchange
|
five variants receive a numeric entry. Other connected
|
||||||
for one Shiny Dark Mage Evo; another asks for one Alucard Evo in exchange for
|
variants remain in the CSV as unranked with `insufficient` confidence.
|
||||||
two Homura Evo. These are **proposed** ratios, not completed trades.
|
|
||||||
|
|
||||||
Shiny Aizen Evo has no clean unit-for-unit quote against normal Aizen Evo in
|
## How the estimates work
|
||||||
this file. One listing asks for 900 rerolls for a Shiny Aizen Evo, and another
|
|
||||||
asks for unspecified "bulks" of normal Aizen Evo. Neither gives a reliable
|
|
||||||
conversion between the two variants. Shiny and normal variants must remain
|
|
||||||
separate in any future valuation model. The known ordering supplied by the
|
|
||||||
user is Shiny Aizen Evo > Aizen Evo; the CSV does not establish the multiplier.
|
|
||||||
|
|
||||||
`interest_index.csv` is a separate demand-versus-supply report. Run
|
The parser accepts an explicit `X + Y for Z` proposal or an offer/request pair
|
||||||
`py -B calculate_interest_index.py` to regenerate it. Its score is **not a
|
whose two sides contain only named variants and quantities. It rejects broad
|
||||||
value**: it counts distinct authors requesting and offering each explicit Evo
|
wish lists, alternatives, unspecified adds, stats and quality descriptions,
|
||||||
or Unevo variant, requires at least 20 total mentions and five on each side,
|
and inventory rows that do not clearly describe a bundle. Each offered unit
|
||||||
then scales `(requested_by + 3) / (offered_by + 3)` to a median of 100. It
|
must appear in the listing's `offer` field. Repeated identical quotes from one
|
||||||
excludes `nlf`, quantities, reposts, and repeat mentions by an author.
|
author count once.
|
||||||
|
|
||||||
For a defensible relative ValueList, collect completed trades or several
|
The model fixes **Aizen Evo = 1,000 points**. It fits unit values so the sum of
|
||||||
independent, specific two-sided quotes per unit pair, including quantities,
|
points on each side of a proposed exchange is approximately equal. Direct
|
||||||
variant, evolution, stat quality, and date. Then fit values only within a
|
unit quotes have three times the weight of bundle quotes. A small pull toward
|
||||||
connected network of comparable trades and show uncertainty for thin data.
|
the 1,000-point reference keeps the sparse equations solvable. Values are
|
||||||
|
rounded to the nearest 50 points. This is an **asking-price model**, not a
|
||||||
|
record of completed exchanges; the regularization affects thin estimates.
|
||||||
|
|
||||||
|
`low` means at least four distinct source rows mention the unit in accepted
|
||||||
|
quotes. `very_low` means two or three. The Aizen reference and Shiny Dark Mage
|
||||||
|
are also displayed when evidence is thinner; their counts are visible. No
|
||||||
|
entry earns high confidence from this dataset. `insufficient` entries have
|
||||||
|
no numeric value or rank.
|
||||||
|
|
||||||
|
Shiny Aizen Evo is placed immediately above normal Aizen Evo from the ordering
|
||||||
|
provided by the user. Its confidence is `constraint_only`, and its numeric
|
||||||
|
value is deliberately blank: the file does not establish a multiplier. A
|
||||||
|
listing asks 900 rerolls for Shiny Aizen, and another asks for unspecified
|
||||||
|
"bulks" of normal Aizen; neither supplies a quantitative comparison.
|
||||||
|
|
||||||
|
The rank of Shiny Aizen represents only **greater than Aizen Evo**. Its true
|
||||||
|
position relative to other units may be higher. For stronger values, collect
|
||||||
|
completed trades or repeated exact quotes with quantities, evolution state,
|
||||||
|
shiny state, stat quality, and date. Fit the model again as those arrive.
|
||||||
|
|
||||||
|
`interest_index.csv`, generated by `py -B calculate_interest_index.py`, is a
|
||||||
|
separate demand-versus-supply report. It must not be read as a value ranking.
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import csv
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
from statistics import median
|
from statistics import median
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
from discord_trade_parser import KNOWN_UNIT_NAMES, normalize_unit_names
|
from discord_trade_parser import KNOWN_UNIT_NAMES, normalize_unit_names
|
||||||
|
|
||||||
@@ -20,7 +21,12 @@ from discord_trade_parser import KNOWN_UNIT_NAMES, normalize_unit_names
|
|||||||
UNIT_NAMES = tuple(
|
UNIT_NAMES = tuple(
|
||||||
name for name in KNOWN_UNIT_NAMES if name.casefold() != "shiny skull knight"
|
name for name in KNOWN_UNIT_NAMES if name.casefold() != "shiny skull knight"
|
||||||
)
|
)
|
||||||
CANONICAL_NAMES = {name.casefold(): normalize_unit_names(name) for name in UNIT_NAMES}
|
def canonical_key(name: str) -> str:
|
||||||
|
return "".join(char for char in unicodedata.normalize("NFKD", name.casefold())
|
||||||
|
if not unicodedata.combining(char))
|
||||||
|
|
||||||
|
|
||||||
|
CANONICAL_NAMES = {canonical_key(name): normalize_unit_names(name) for name in UNIT_NAMES}
|
||||||
UNIT_PATTERN = re.compile(
|
UNIT_PATTERN = re.compile(
|
||||||
r"(?<!\w)(?P<shiny>Shiny\s+)?(?P<unit>"
|
r"(?<!\w)(?P<shiny>Shiny\s+)?(?P<unit>"
|
||||||
+ "|".join(re.escape(name).replace(r"\ ", r"\s+") for name in UNIT_NAMES)
|
+ "|".join(re.escape(name).replace(r"\ ", r"\s+") for name in UNIT_NAMES)
|
||||||
@@ -36,7 +42,7 @@ def variants(text: str, *, request: bool = False) -> set[str]:
|
|||||||
for match in UNIT_PATTERN.finditer(text):
|
for match in UNIT_PATTERN.finditer(text):
|
||||||
if request and MY_PREFIX.search(text[max(0, match.start() - 12):match.start()]):
|
if request and MY_PREFIX.search(text[max(0, match.start() - 12):match.start()]):
|
||||||
continue
|
continue
|
||||||
name = CANONICAL_NAMES[match.group("unit").casefold()]
|
name = CANONICAL_NAMES[canonical_key(match.group("unit"))]
|
||||||
shiny = "Shiny " if match.group("shiny") else ""
|
shiny = "Shiny " if match.group("shiny") else ""
|
||||||
evolution = match.group("evolution").capitalize()
|
evolution = match.group("evolution").capitalize()
|
||||||
found.add(f"{shiny}{name} {evolution}")
|
found.add(f"{shiny}{name} {evolution}")
|
||||||
|
|||||||
Reference in New Issue
Block a user