quantjourney-bidask 0.9.0__py3-none-any.whl → 0.9.2__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.
@@ -1,6 +1,6 @@
1
1
  """Version information for quantjourney_bidask."""
2
2
 
3
- __version__ = "0.9.0"
3
+ __version__ = "0.9.2"
4
4
  __author__ = "Jakub Polec"
5
5
  __email__ = "jakub@quantjourney.pro"
6
6
  __license__ = "MIT"
@@ -47,10 +47,14 @@ def edge(
47
47
  Examples
48
48
  --------
49
49
  >>> import pandas as pd
50
- >>> df = pd.read_csv("https://raw.githubusercontent.com/eguidotti/bidask/main/pseudocode/ohlc.csv")
51
- >>> spread = edge(df.Open, df.High, df.Low, df.Close)
50
+ >>> # Example OHLC data
51
+ >>> open_prices = [100.0, 101.5, 99.8, 102.1, 100.9]
52
+ >>> high_prices = [102.3, 103.0, 101.2, 103.5, 102.0]
53
+ >>> low_prices = [99.5, 100.8, 98.9, 101.0, 100.1]
54
+ >>> close_prices = [101.2, 102.5, 100.3, 102.8, 101.5]
55
+ >>> spread = edge(open_prices, high_prices, low_prices, close_prices)
52
56
  >>> print(f"Estimated spread: {spread:.6f}")
53
- Estimated spread: 0.010185
57
+ Estimated spread: 0.007109
54
58
  """
55
59
  # Convert inputs to numpy arrays
56
60
  open = np.asarray(open, dtype=float)
@@ -41,9 +41,15 @@ def edge_expanding(
41
41
  Examples
42
42
  --------
43
43
  >>> import pandas as pd
44
- >>> df = pd.read_csv("https://raw.githubusercontent.com/eguidotti/bidask/main/pseudocode/ohlc.csv")
45
- >>> spreads = edge_expanding(df, min_periods=21)
46
- >>> print(spreads.head())
44
+ >>> # Example OHLC DataFrame
45
+ >>> df = pd.DataFrame({
46
+ ... 'open': [100.0, 101.5, 99.8, 102.1, 100.9, 103.2],
47
+ ... 'high': [102.3, 103.0, 101.2, 103.5, 102.0, 104.8],
48
+ ... 'low': [99.5, 100.8, 98.9, 101.0, 100.1, 102.5],
49
+ ... 'close': [101.2, 102.5, 100.3, 102.8, 101.5, 104.1]
50
+ ... })
51
+ >>> spreads = edge_expanding(df, min_periods=3)
52
+ >>> print(spreads.dropna())
47
53
  """
48
54
  # Standardize column names
49
55
  df = df.rename(columns=str.lower).copy()
@@ -47,9 +47,15 @@ def edge_rolling(
47
47
  Examples
48
48
  --------
49
49
  >>> import pandas as pd
50
- >>> df = pd.read_csv("https://raw.githubusercontent.com/eguidotti/bidask/main/pseudocode/ohlc.csv")
51
- >>> spreads = edge_rolling(df, window=21)
52
- >>> print(spreads.head())
50
+ >>> # Example OHLC DataFrame
51
+ >>> df = pd.DataFrame({
52
+ ... 'open': [100.0, 101.5, 99.8, 102.1, 100.9],
53
+ ... 'high': [102.3, 103.0, 101.2, 103.5, 102.0],
54
+ ... 'low': [99.5, 100.8, 98.9, 101.0, 100.1],
55
+ ... 'close': [101.2, 102.5, 100.3, 102.8, 101.5]
56
+ ... })
57
+ >>> spreads = edge_rolling(df, window=3)
58
+ >>> print(spreads.dropna())
53
59
  """
54
60
  # Standardize column names
55
61
  df = df.rename(columns=str.lower).copy()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantjourney-bidask
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: Efficient bid-ask spread estimator from OHLC prices
5
5
  Author-email: Jakub Polec <jakub@quantjourney.pro>
6
6
  License-Expression: MIT
@@ -218,13 +218,13 @@ quantjourney_bidask/
218
218
  The package includes comprehensive examples with beautiful visualizations:
219
219
 
220
220
  ### Basic Data Analysis
221
- ![Crypto Spread Analysis](_output/crypto_spread_comprehensive_analysis.png)
221
+ ![Crypto Spread Analysis](https://raw.githubusercontent.com/QuantJourneyOrg/qj_bidask/ad49bd78c82ab1c44561d0f2e707ae304575a147/_output/crypto_spread_comprehensive_analysis.png)
222
222
 
223
223
  ### Crypto Spread Comparison
224
- ![Crypto Spread Comparison](_output/crypto_spread_comparison.png)
224
+ ![Crypto Spread Comparison](https://raw.githubusercontent.com/QuantJourneyOrg/qj_bidask/refs/heads/main/_output/crypto_spread_comparison.png)
225
225
 
226
226
  ### Spread Estimation Results
227
- ![Spread Estimator Results](_output/spread_estimator_results.png)
227
+ ![Spread Estimator Results](https://raw.githubusercontent.com/QuantJourneyOrg/qj_bidask/refs/heads/main/_output/spread_estimator_results.png)
228
228
 
229
229
  ### Running Examples
230
230
 
@@ -351,22 +351,6 @@ Real-time features:
351
351
  - Threshold alerts
352
352
  - Multi-symbol monitoring
353
353
 
354
- ## Academic Citation
355
-
356
- If you use this library in academic research, please cite:
357
-
358
- ```bibtex
359
- @article{ardia2024efficient,
360
- title={Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices},
361
- author={Ardia, David and Guidotti, Emanuele and Kroencke, Tim A},
362
- journal={Journal of Financial Economics},
363
- volume={161},
364
- pages={103916},
365
- year={2024},
366
- publisher={Elsevier}
367
- }
368
- ```
369
-
370
354
  ## License
371
355
 
372
356
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,12 @@
1
+ quantjourney_bidask/__init__.py,sha256=vumoRDEDOTclYapknfSwKpCZi9IdfJbukdp7S1-kphA,409
2
+ quantjourney_bidask/_version.py,sha256=UBCLMHVzRMf_CZST0MvEG2hcAApDHyD7gbGvGJockQI,220
3
+ quantjourney_bidask/data_fetcher.py,sha256=GMVf4wRVwIE2JJ2sYAR_CCo56JQnReNhTWTSrZc0-L0,4931
4
+ quantjourney_bidask/edge.py,sha256=YdL8So3i9CKQsDm6lI6mNRe-ODhisRhipksq-sfRmuk,6274
5
+ quantjourney_bidask/edge_expanding.py,sha256=gAdow81VBb2rXtfoEzDur8xvu-rwfo1OQbt3LbUfq4w,2268
6
+ quantjourney_bidask/edge_rolling.py,sha256=z8463emBLaxa0ceUBk9TPfVayFANo8IeDJ_fuDzGcfA,9103
7
+ quantjourney_bidask/websocket_fetcher.py,sha256=xMS_qLbSW9hCS3RbNKvkn5HTK0XGmAO4wpaAl4_Mxb4,10895
8
+ quantjourney_bidask-0.9.2.dist-info/licenses/LICENSE,sha256=m8MEOGnpSBtS6m9z4M9m1JksWWPzu1OK3UgY1wuHf04,1081
9
+ quantjourney_bidask-0.9.2.dist-info/METADATA,sha256=uGpp2WQC7uub5QjxuuaIHbfyBTchADQMVgN-BDm1tsg,13164
10
+ quantjourney_bidask-0.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ quantjourney_bidask-0.9.2.dist-info/top_level.txt,sha256=rOBM4GxA87iQv-mR8-WZdu3-Yj5ESyggRICpUhJ-4Dg,20
12
+ quantjourney_bidask-0.9.2.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- quantjourney_bidask/__init__.py,sha256=vumoRDEDOTclYapknfSwKpCZi9IdfJbukdp7S1-kphA,409
2
- quantjourney_bidask/_version.py,sha256=PNfYxivWH2RCzGECwhMnGzRhNhiDg7KULZppaKoLiAI,220
3
- quantjourney_bidask/data_fetcher.py,sha256=GMVf4wRVwIE2JJ2sYAR_CCo56JQnReNhTWTSrZc0-L0,4931
4
- quantjourney_bidask/edge.py,sha256=z-uRUH3Rot6Zw-dPa2pNlQu0hY1YJu6d0c18IyqbiNs,6105
5
- quantjourney_bidask/edge_expanding.py,sha256=bN6lBetJdqC2xSdRc1RTjHfSI1XXVKegl0GQaD8eanY,2047
6
- quantjourney_bidask/edge_rolling.py,sha256=CAZW_wBF7G6mGLenoEwlq4yB_1x1-PsQ4TgwL-zdM7w,8910
7
- quantjourney_bidask/websocket_fetcher.py,sha256=xMS_qLbSW9hCS3RbNKvkn5HTK0XGmAO4wpaAl4_Mxb4,10895
8
- quantjourney_bidask-0.9.0.dist-info/licenses/LICENSE,sha256=m8MEOGnpSBtS6m9z4M9m1JksWWPzu1OK3UgY1wuHf04,1081
9
- quantjourney_bidask-0.9.0.dist-info/METADATA,sha256=BIMxqvn5Nijih6S43QCAo6RM_Ik1Df5NRV1X8Q-VkWg,13313
10
- quantjourney_bidask-0.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- quantjourney_bidask-0.9.0.dist-info/top_level.txt,sha256=rOBM4GxA87iQv-mR8-WZdu3-Yj5ESyggRICpUhJ-4Dg,20
12
- quantjourney_bidask-0.9.0.dist-info/RECORD,,