hkjc 0.3.8__py3-none-any.whl → 0.3.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hkjc/processing.py CHANGED
@@ -99,12 +99,8 @@ def generate_all_pla_trades(date: str, venue_code: str, race_number: int, rebate
99
99
  N = len(odds['PLA'])
100
100
  candidates = np.arange(1, N+1)
101
101
 
102
- fit_res = fit_harville_to_odds(
103
- W_obs=odds['WIN'],
104
- Qin_obs=odds['QIN'],
105
- Q_obs=odds['QPL'],
106
- b_obs=odds['PLA']
107
- )
102
+ fit_res = fit_harville_to_odds(odds)
103
+
108
104
  if fit_res['success']:
109
105
  odds['PLA'] = np.nan_to_num(1/fit_res['b_fitted'], posinf=0)
110
106
  odds['QPL'] = np.nan_to_num(1/fit_res['Q_fitted'], posinf=0)
hkjc/speedpro.py CHANGED
@@ -36,6 +36,7 @@ def speedpro_energy(race_date: str) -> pl.DataFrame:
36
36
 
37
37
  df = (df.with_columns(pl.col('RunnerNumber').str.to_integer())
38
38
  .with_columns(pl.col('SpeedPRO_Energy_Difference').str.to_integer())
39
+ .with_columns(pl.col('FitnessRatings').str.to_integer())
39
40
  .select(['RaceNo', 'RunnerNumber', 'HorseName', 'FitnessRatings','SpeedPRO_Energy_Difference']))
40
41
 
41
42
  return df
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hkjc
3
- Version: 0.3.8
3
+ Version: 0.3.9
4
4
  Summary: Library for scrapping HKJC data and perform basic analysis
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: cachetools>=6.2.0
@@ -3,11 +3,11 @@ hkjc/harville_model.py,sha256=MZjPLS-1nbEhp1d4Syuq13DtraKnd7TlNqBmOOCwxgc,15976
3
3
  hkjc/historical.py,sha256=wKTJi--0Mx_x0vO0ysOGD37oM8453woQK-cLzPOLgiQ,336
4
4
  hkjc/live_odds.py,sha256=HQZCvEMUG4YNVj2IaFshU5HD0j5mfBSSDhksNla-ERk,4768
5
5
  hkjc/optimization.py,sha256=p_NwPfl8qrcg2XWfHX4D7_jSRT819oVcctK-4VuvtME,3783
6
- hkjc/processing.py,sha256=MCP42v-DgQBVUx7g2yhlfbZusj7Q60N2sqzFBdIUb94,5028
6
+ hkjc/processing.py,sha256=bOc1j7xjeguMNDwJ2rovFf24xkdTSfaTD3O15J3JR2Q,4919
7
7
  hkjc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- hkjc/speedpro.py,sha256=5KFcVwxcblSaP8_G6W15h1Nkt-yJHJ7gVKwo3kpumS4,1964
8
+ hkjc/speedpro.py,sha256=Y2Z3GYGeePc4sM-ZnCHXCI1N7L-_j9nrMqS3CC5BBSo,2031
9
9
  hkjc/strategy/place_only.py,sha256=Dfzqr1PmWd9xHpylXO0Zlww9xMoIFPQ_gMHvRunw_1Q,2049
10
10
  hkjc/strategy/qpbanker.py,sha256=MQxjwsfhllKZroKS8w8Q3bi3HMjGc1DAyBIjNZAp3yQ,4805
11
- hkjc-0.3.8.dist-info/METADATA,sha256=VNe1lDBAfidKWBTMaBd5al2srXFCLWBOegOzh49xfE0,413
12
- hkjc-0.3.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
- hkjc-0.3.8.dist-info/RECORD,,
11
+ hkjc-0.3.9.dist-info/METADATA,sha256=cF0R7g7vlmAGFh7x0r3s67uEQoufyYeMUuBmEsw25c8,413
12
+ hkjc-0.3.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
+ hkjc-0.3.9.dist-info/RECORD,,
File without changes