pyalgotrading 2023.11.1__py3-none-any.whl → 2024.1.1__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.
File without changes
@@ -0,0 +1,23 @@
1
+ import pandas as pd
2
+
3
+ def VWAP(hist_data_df):
4
+
5
+ # Disable this warning: A value is trying to be set on a copy of a slice from a DataFrame.
6
+ pd.options.mode.chained_assignment = None # default='warn'
7
+
8
+ # VWAP behaves specially as compared to other indicators
9
+ # It uses only current day's historical data
10
+ hist_data_df['date'] = hist_data_df['timestamp'].apply(lambda x: x.date())
11
+ unique_dates = sorted(set(hist_data_df['date']))
12
+ vwap = []
13
+
14
+ # Compute vwap for each day's data & append it to vwap variable
15
+ for i, date in enumerate(unique_dates):
16
+ day_df = hist_data_df.loc[hist_data_df['date'] == date]
17
+ typical_price_day_df = (day_df.high + day_df.low + day_df.close) / 3
18
+ vwap_day = list(((typical_price_day_df * day_df.volume).cumsum()) / day_df.volume.cumsum())
19
+ vwap += vwap_day
20
+
21
+ vwap = pd.Series(vwap)
22
+
23
+ return vwap
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyalgotrading
3
- Version: 2023.11.1
3
+ Version: 2024.1.1
4
4
  Summary: Official Python Package for Algorithmic Trading APIs powered by AlgoBulls
5
5
  Home-page: https://github.com/algobulls/pyalgotrading
6
6
  Author: Pushpak Dagade
@@ -35,11 +35,11 @@ Official Python Package for Algorithmic Trading APIs powered by AlgoBulls!
35
35
 
36
36
  ### Features
37
37
 
38
- - Powered by the [AlgoBulls Platform](https://app.algobulls.com)
38
+ - Powered by the [AlgoBulls Platform]([https://app.algobulls.com](https://algobulls.com/build/))
39
39
  - Everything related to Algorithmic Trading Strategies!
40
- - Create & upload strategies on the [AlgoBulls Platform](https://app.algobulls.com)
41
- - Free pool of Strategies are available separately at [pyalgostrategypool](https://github.com/algobulls/pyalgostrategypool)!
42
- - Support for all 150+ Technical Indicators provided by [TA-Lib](https://mrjbq7.github.io/ta-lib/index.html)
40
+ - Free pool of Strategies are available at [pyalgostrategypool](https://github.com/algobulls/pyalgostrategypool)!
41
+ - Create & upload strategies easily on the cloud
42
+ - Support for all 150+ Technical Indicators provided by [TA-Lib](https://pypi.org/project/TA-Lib/)
43
43
  - Support for multiple candlesticks patterns - Japanese OHLC, Renko, Heikin-Ashi, Linebreak
44
44
  - Support for multiple candle intervals - 1 minute, 3 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 day.
45
45
  - Support for **Regular Orders**, **Bracket Orders** and **Cover Orders**
@@ -47,26 +47,38 @@ Official Python Package for Algorithmic Trading APIs powered by AlgoBulls!
47
47
  - Support for **INTRADAY** and **DELIVERY** orders
48
48
  - Support for **Backtesting**
49
49
  - Support for **Paper Trading**
50
- - Support for **Real Trading** (subject to approval)
51
- - Support for multiple brokers for Real Trading. Check list of supported brokers [here](https://app.algobulls.com/user/brokerlogin).
52
- - Real-time Logs for Backtesting, Paper Trading, Real Trading
53
- - Multiple real-time Reports available for Backtesting, Paper Trading and Real Trading:
50
+ - Support for **Live Trading** / **Real Trading**
51
+ - Support for multiple brokers for Live Trading. Check list of supported brokers [here](https://app.algobulls.com/user/brokerlogin).
52
+ - Real-time Logs for Backtesting, Paper Trading, Live Trading
53
+ - Multiple real-time Reports available for Backtesting, Paper Trading and Live Trading:
54
54
  - Profit-&-Loss report (P&L report)
55
55
  - Statistics Report
56
56
  - Order History Log for each order with state transitions & timestamps
57
+ - Detailed analytics with charts
58
+ - Support for calculating Slippage
59
+ - Support for calculating Brokerage
60
+ - Support for importing external P&L table and generating analytics on the same
57
61
  - Plot Candlestick charts using [plotly.py](https://github.com/plotly/plotly.py)
58
62
 
59
63
  Backtesting, Paper Trading and Real Trading can be performed on the same strategy code base!
60
64
 
61
65
  ### Documentation
62
66
 
63
- You can find the docs [here](https://algobulls.github.io/pythonbuild/).
67
+ You can find the docs [here](https://algobulls.github.io/pyalgotrading/).
68
+
69
+ ### Jupyter Notebooks
70
+
71
+ Easily access and use complete Jupyter Notebook for NASDSAQ and NSE markets [here](https://github.com/algobulls/pyalgotrading/tree/master/jupyter).
72
+ You can:
73
+ - Easily view them on the web using [nbviewer](https://nbviewer.org/), without installing Python or Jupyter Notebooks.
74
+ - Easily execute them on the web using [Binder](https://mybinder.org/), without installing Python or Jupyter Notebooks.
75
+ - Download and use them on your local machine, and installing Python & Jupyter Notebooks
64
76
 
65
77
  ### Python
66
78
 
67
- - Python Support: `Python 3.6+`.
79
+ - Python Support: `Python 3.8+`.
68
80
  - Python Requirements: See [requirements.txt](https://github.com/algobulls/pyalgotrading/blob/master/requirements.txt).
69
- - We recommend you to use the latest version of Python (v3.8+) to enjoy better performance benefits, especially for pandas. (For Python 3.6, the latest supported Pandas version is v0.25.3. For Python 3.8, the latest supported version is v1.0.x)
81
+ - We recommend you to use the latest version of Python (v3.8+) to enjoy better performance benefits, especially for pandas.
70
82
 
71
83
  ### Installation
72
84
 
@@ -79,7 +91,7 @@ pip install pyalgotrading
79
91
  ### Support / Getting Help
80
92
 
81
93
  - *Bug Reporting / New Feature Request*: Please [create a new issue](https://github.com/algobulls/pyalgotrading/issues/new) here on GitHub.
82
- - *Discussion Forum*: [AlgoBulls Community Forum](https://community.algobulls.com/)
94
+ - *Discussion Community*: [Slack](https://join.slack.com/t/algotradingninjas/shared_invite/zt-234npz3lu-A1f55maTr~j0tOIoxWA5hA)
83
95
  - *Additional Support*: If none of the above help, please contact [pushpak@algobulls.com](mailto:pushpak@algobulls.com).
84
96
 
85
97
  ### Contribution Guidelines
@@ -93,7 +105,7 @@ Here’s how we suggest you go about proposing a change to this project:
93
105
 
94
106
  ### Rewards
95
107
 
96
- If you are interested in contributing to [pyalgostrategypool](https://github.com/algobulls/pyalgostrategypool), our official pool of FREE algorithmic trading strategies, please reach out to support@algobulls.com.
108
+ If you are interested in contributing to this repo, **pyalgotrading** or [**pyalgostrategypool**](https://github.com/algobulls/pyalgostrategypool), our official pool of FREE algorithmic trading strategies, please join our official [Slack](https://join.slack.com/t/algotradingninjas/shared_invite/zt-234npz3lu-A1f55maTr~j0tOIoxWA5hA) community.
97
109
  You would be provided with credits for unlimited trading access on the AlgoBulls platform.
98
110
 
99
111
 
@@ -8,6 +8,8 @@ pyalgotrading/broker/__init__.py,sha256=jXVWBVRlqzevKxNDqrPANJz9WubROBes8gaKcxcY
8
8
  pyalgotrading/broker/broker_connection_base.py,sha256=vAJN5EAQuVfL8Ngf03wsaI5TTGdziCHKCb0bczGgSJ0,7594
9
9
  pyalgotrading/broker/broker_connection_zerodha.py,sha256=bw9Eu40YhSbRLhvVniY255uYeziX_EOVBPkfUUg4tFs,13703
10
10
  pyalgotrading/broker/utils.py,sha256=ojL1oebAjNrY_sS2z9JKHy1qo-Pif0ED2uNKLwdnQxo,1204
11
+ pyalgotrading/indicator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ pyalgotrading/indicator/vwap.py,sha256=gBHIwvLovtTQjkxpqWjWRSBQdZE7S92_6d04G86tAnA,887
11
13
  pyalgotrading/instrument/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
14
  pyalgotrading/instrument/instrument.py,sha256=PKqq784MYmpvBL2MIde1n44U9kwuRdSNIot1KKQ5J-o,1688
13
15
  pyalgotrading/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -26,8 +28,8 @@ pyalgotrading/utils/candlesticks/__init__.py,sha256=maIn__tvTvJDjldPhU9agBcNNuRO
26
28
  pyalgotrading/utils/candlesticks/heikinashi.py,sha256=SpcuK7AYV0sgzcw-DMfLNtTDn2RfWqGvWBt4no7yKD4,2003
27
29
  pyalgotrading/utils/candlesticks/linebreak.py,sha256=cYwoETMrenWOa06d03xASZoiou-qRz7n2mZYCi5ilEs,1434
28
30
  pyalgotrading/utils/candlesticks/renko.py,sha256=zovQ6D658pBLas86FuTu9fU3-Kkv2hM-4h7OQJjdxng,2089
29
- pyalgotrading-2023.11.1.dist-info/LICENSE,sha256=-LLEprvixKS-LwHef99YQSOFon_tWeTwJRAWuUwwr1g,1066
30
- pyalgotrading-2023.11.1.dist-info/METADATA,sha256=-9c3qtnHhkLbllcmdFwBKWHEvrSMaCjT9If2vY4POJs,5140
31
- pyalgotrading-2023.11.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
32
- pyalgotrading-2023.11.1.dist-info/top_level.txt,sha256=A12PTnbXqO3gsZ0D0Gkyzf_OYRQxjJvtg3MqN-Ur2zY,14
33
- pyalgotrading-2023.11.1.dist-info/RECORD,,
31
+ pyalgotrading-2024.1.1.dist-info/LICENSE,sha256=-LLEprvixKS-LwHef99YQSOFon_tWeTwJRAWuUwwr1g,1066
32
+ pyalgotrading-2024.1.1.dist-info/METADATA,sha256=2U8wBVuuA1caf1nBLb6XvNNWsJM00SvuDixMapl1iZw,5866
33
+ pyalgotrading-2024.1.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
34
+ pyalgotrading-2024.1.1.dist-info/top_level.txt,sha256=A12PTnbXqO3gsZ0D0Gkyzf_OYRQxjJvtg3MqN-Ur2zY,14
35
+ pyalgotrading-2024.1.1.dist-info/RECORD,,