Skip to content

Commit 608f4f9

Browse files
committed
upload to PyPi
1 parent 11b18a2 commit 608f4f9

File tree

7 files changed

+120
-27
lines changed

7 files changed

+120
-27
lines changed

README.md

+70-17
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,90 @@
99

1010
## Overview
1111

12-
A trading robot written in Python that can run automated strategies using a technical analysis. The robot is designed to mimic a few common scenarios:
12+
Current Version: **0.1.0**
1313

14-
1. Maintaining a portfolio of multiple instruments. The `Portfolio` object will be able to calculate common risk metrics related to a portfolio and give real-time feedback as you trade.
14+
A trading robot written in Python that can run automated strategies using a technical analysis.
15+
The robot is designed to mimic a few common scenarios:
1516

16-
2. Define an order that can be used to trade a financial instrument. With the `Trade` object, you can define simple or even complex orders using Python. These orders will also help similify common scenarios like defining both a take profit and stop loss at the same time.
17+
1. Maintaining a portfolio of multiple instruments. The `Portfolio` object will be able
18+
to calculate common risk metrics related to a portfolio and give real-time feedback
19+
as you trade.
1720

18-
3. A real-time data table that includes both historical and real-time prices as they change. The `StockFrame` will make the process of storing your data easy and quick. Additionally, it will be setup so that way you can easily select your financial data as it comes in and do further analysis if needed.
21+
2. Define an order that can be used to trade a financial instrument. With the `Trade` object,
22+
you can define simple or even complex orders using Python. These orders will also help similify
23+
common scenarios like defining both a take profit and stop loss at the same time.
1924

20-
4. Define and calculate indicators using both historical and real-time prices. The `Indicator` object will help you easily define the input of your indicators, calculate them, and then update their values as new prices come.
25+
3. A real-time data table that includes both historical and real-time prices as they change. The
26+
`StockFrame` will make the process of storing your data easy and quick. Additionally, it will be
27+
setup so that way you can easily select your financial data as it comes in and do further analysis
28+
if needed.
29+
30+
4. Define and calculate indicators using both historical and real-time prices. The `Indicator` object
31+
will help you easily define the input of your indicators, calculate them, and then update their values
32+
as new prices come.
2133

2234
## Setup
2335

24-
Right now, the library is not hosted on **PyPi** so you will need to do a local install on your system if you plan to use it in other scrips you use.
36+
**Setup - Local Install:**
37+
38+
If you are planning to make modifications to this project or you would like to access it
39+
before it has been indexed on `PyPi`. I would recommend you either install this project
40+
in `editable` mode or do a `local install`. For those of you, who want to make modifications
41+
to this project. I would recommend you install the library in `editable` mode.
2542

26-
First, clone this repo to your local system. After you clone the repo, make sure to run the `setup.py` file, so you can install any dependencies you may need. To run the `setup.py` file, run the following command in your terminal.
43+
If you want to install the library in `editable` mode, make sure to run the `setup.py`
44+
file, so you can install any dependencies you may need. To run the `setup.py` file,
45+
run the following command in your terminal.
2746

2847
```console
2948
pip install -e .
3049
```
3150

32-
This will install all the dependencies listed in the `setup.py` file. Once done you can use the library wherever you want.
51+
If you don't plan to make any modifications to the project but still want to use it across
52+
your different projects, then do a local install.
53+
54+
```console
55+
pip install .
56+
```
57+
58+
This will install all the dependencies listed in the `setup.py` file. Once done
59+
you can use the library wherever you want.
60+
61+
**Setup - PyPi Install:**
62+
63+
The project can be found at PyPI, if you'd like to view the project please use this
64+
[link](https://pypi.org/project/python-trading-robot/). To **install** the library,
65+
run the following command from the terminal.
66+
67+
```bash
68+
pip install python-trading-robot
69+
```
70+
71+
**Setup - PyPi Upgrade:**
72+
73+
To **upgrade** the library, run the following command from the terminal.
74+
75+
```bash
76+
pip install --upgrade python-trading-robot
77+
```
3378

3479
## Usage
3580

36-
To run the robot, you will need to provide a few pieces of information from your TD Ameritrade Developer account. The following items are need for authentication:
81+
To run the robot, you will need to provide a few pieces of information from your TD Ameritrade Developer account.
82+
The following items are need for authentication:
3783

38-
- Client ID: Also, called your consumer key, this was provided when you registered an app with the TD Ameritrade Developer platform. An example of a client ID could look like the following `MMMMYYYYYA6444VXXXXBBJC3DOOOO`.
84+
- Client ID: Also, called your consumer key, this was provided when you registered an app with the TD Ameritrade
85+
Developer platform. An example of a client ID could look like the following `MMMMYYYYYA6444VXXXXBBJC3DOOOO`.
3986

40-
- Redirect URI: Also called the callbakc URL or redirect URL, this was specified by you when you regiestered your app with the TD Ameritrade Developer platform. Here is an example of a redirect URI <https://localhost/mycallback>
87+
- Redirect URI: Also called the callbakc URL or redirect URL, this was specified by you when you regiestered your app with
88+
the TD Ameritrade Developer platform. Here is an example of a redirect URI <https://localhost/mycallback>
4189

42-
- Credentials Path: This is a file path that will point to a JSON file where your state info will be saved. Keep in mind that it is okay if it points to a non-existing file as once you run the script the file will be auto generated. For example, if I want my state info to be saved to my desktop, then it would look like the following: `C:\Users\Desktop\ts_state.json`
90+
- Credentials Path: This is a file path that will point to a JSON file where your state info will be saved. Keep in mind
91+
that it is okay if it points to a non-existing file as once you run the script the file will be auto generated. For example,
92+
if I want my state info to be saved to my desktop, then it would look like the following: `C:\Users\Desktop\ts_state.json`
4393

44-
Once you've identfied those pieces of info, you can run the robot. Here is a simple example that will create a new instance of it:
94+
Once you've identfied those pieces of info, you can run the robot. Here is a simple example that will create a new instance
95+
of it:
4596

4697
```python
4798
from pyrobot.robot import PyRobot
@@ -54,15 +105,17 @@ trading_robot = PyRobot(
54105
)
55106
```
56107

57-
For more detailed examples, go to the `trading_robot.py` file to see an example of how to use the library along with all the different objects inside.
108+
For more detailed examples, go to the `trading_robot.py` file to see an example of how to use the library along with all
109+
the different objects inside.
58110

59111
## Support these Projects
60112

61113
**Patreon:**
62-
Help support this project and future projects by donating to my [Patreon Page](https://www.patreon.com/sigmacoding). I'm always looking to add more content for individuals like yourself, unfortuantely some of the APIs I would require me to pay monthly fees.
114+
Help support this project and future projects by donating to my [Patreon Page](https://www.patreon.com/sigmacoding). I'm always
115+
looking to add more content for individuals like yourself, unfortuantely some of the APIs I would require me to pay monthly fees.
63116

64117
**YouTube:**
65118
If you'd like to watch more of my content, feel free to visit my YouTube channel [Sigma Coding](https://www.youtube.com/c/SigmaCoding).
66119

67-
**Hire Me:**
68-
If you have a project, you think I can help you with feel free to reach out at [[email protected]](mailto:[email protected]?subject=[GitHub]%20Project%20Proposal) or fill out the [contract request form](https://forms.office.com/Pages/ResponsePage.aspx?id=ZwOBErInsUGliXx0Yo2VfcCSWZSwW25Es3vPV2veU0pUMUs5MUc2STkzSzVQMFNDVlI5NjJVNjREUi4u)
120+
<!-- **Hire Me:**
121+
If you have a project, you think I can help you with feel free to reach out at [[email protected]](mailto:[email protected]?subject=[GitHub]%20Project%20Proposal) or fill out the [contract request form](https://forms.office.com/Pages/ResponsePage.aspx?id=ZwOBErInsUGliXx0Yo2VfcCSWZSwW25Es3vPV2veU0pUMUs5MUc2STkzSzVQMFNDVlI5NjJVNjREUi4u) -->
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.py

+50-10
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,73 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import setup
2+
from setuptools import find_namespace_packages
23

34
# load the README file.
4-
with open("README.md", "r") as fh:
5+
with open(file="README.md", mode="r") as fh:
56
long_description = fh.read()
67

78
setup(
8-
name='pyrobot',
9+
10+
name='python-trading-robot',
11+
912
author='Alex Reed',
13+
1014
author_email='[email protected]',
15+
1116
version='0.1.0',
17+
1218
description='A trading robot built for Python that uses the TD Ameritrade API.',
19+
1320
long_description=long_description,
21+
1422
long_description_content_type="text/markdown",
23+
1524
url='https://github.com/areed1192/python-trading-robot',
25+
1626
install_requires=[
17-
'td-ameritrade-python-api',
18-
'pandas',
19-
'numpy'
27+
'td-ameritrade-python-api==0.3.0',
28+
'pandas==1.0.5',
29+
'numpy==1.19.0'
2030
],
31+
2132
keywords='finance, td ameritrade, api, trading robot',
22-
packages=find_packages(include=['pyrobot'], exclude=['*config.py']),
33+
34+
packages=find_namespace_packages(
35+
include=['pyrobot', 'samples', 'tests'],
36+
exclude=['configs*']
37+
),
38+
2339
include_package_data=True,
40+
41+
python_requires='>=3.8',
42+
2443
classifiers=[
44+
45+
# I can say what phase of development my library is in.
2546
'Development Status :: 3 - Alpha',
47+
48+
# Here I'll add the audience this library is intended for.
49+
'Intended Audience :: Developers',
50+
'Intended Audience :: Science/Research',
2651
'Intended Audience :: Financial and Insurance Industry',
52+
53+
# Here I'll define the license that guides my library.
2754
'License :: OSI Approved :: MIT License',
55+
56+
# Here I'll note that package was written in English.
2857
'Natural Language :: English',
58+
59+
# Here I'll note that any operating system can use it.
2960
'Operating System :: OS Independent',
30-
'Programming Language :: Python :: 3'
31-
],
32-
python_requires='>=3.7'
61+
62+
# Here I'll specify the version of Python it uses.
63+
'Programming Language :: Python',
64+
'Programming Language :: Python :: 3',
65+
'Programming Language :: Python :: 3.8',
66+
67+
# Here are the topics that my library covers.
68+
'Topic :: Database',
69+
'Topic :: Education',
70+
'Topic :: Office/Business'
71+
72+
]
3373
)

0 commit comments

Comments
 (0)