marco
April 11, 2022, 2:41pm
1
Hello,
I just published five more articles for data mining users that may be doing screen scraping or using our API tools. Our documentation in this area was simply not very good but it’s getting better. The new articles are in this collection DataMiner & API
The new articles are:
Introduction to the API and Tools
Intro to our data mining tools that can be used outside of the website
How to Automate your Research with DataMiner
Run multiple operations with our “no-code” application
How to Run a Screen Backtest Using the API in Google Colab
Example on using the p123api wrapper to run a screen backtest and chart the results
The API Wrapper - p123api
Describes the p123api package with objects and functions that facilitate using the P123 API
DataMiner Operations
All the DataMiner operations
Documentation is still a work in progress so let us know or issues and what things you need.
Thanks
Jrinne
April 11, 2022, 4:30pm
2
Thank you Marco. Great stuff. There are obviously some good Python programers at P123.
For those who have not used Colab a lot yet and are learning about it (like me), here is the code to upload a csv file from your computer into Colab:
from google.colab import files
uploaded = files.upload()
for fn in uploaded.keys():
print(‘User uploaded file “{name}” with length {length} bytes’.format(
name=fn, length=len(uploaded[fn])))
Then to use the file in a program (JASPTrim2.csv in this example):
import pandas as pd
import io
df2 = pd.read_csv(io.BytesIO(uploaded[‘JASPTrim2.csv’]))
df2
Best,
Jim
mm123
April 11, 2022, 8:11pm
3
Hi Marco,
These are very helpful, thanks.
Can you add some API’s/Scripts for the content in the Strategies/Books, in the same way you did for Screens?
Thanks,
Ed
marco
April 12, 2022, 4:12am
4
Did you try the strategy() function of p123api ? It does not run a strategy , it just returns all the stats. I suggest you try it with a small simulation first to understand the structure of the data returned
Here’s an example I ran in Colab Google Colab
It only prints a small portion of the stats since the JSON returned is very large
Are you looking to run portfolio simulations using the API?
mm123
April 12, 2022, 8:18pm
5
Thanks Marco, that’s very helpful. I’ll give that a try.