NEW: Data Miner App & P123 API -- v1.0 (beta)

All you have to do is remove the caps on how much data we can download and its perfect… (I know a bit about programming).

Frederic,

I assume you were aware that Quantopian will be offering the equivalent of designer models (it looks like): https://www.quantopian.com/live-portfolios

I just got the above link in an email.

I still think P123 is in a stronger situation that Quantopian because of P123’s management of the data (whatever the membership numbers are aside). But whatever the truth is Quantopian refuses to sit still.

BTW, this email came just before Marc Chaikin’s email giving his (and presumably some of Marc Gerstein’s) list of preferred factors and this link: https://app.chaikinanalytics.com/CPTRestSecure/ResearchReport/index.jsp?symbol=AAPL&environment=camteam&version=1.0&token=0PP43177DE04O173F082F97BAS7745Q2&inf_contact_key=f42411e688491b9e8d0f9f65953f8d1316358d5485884e2f31e6019a0d26c8b0

Best,

Jim

Can anyone provide an example showing how to update an existing rank? By looking at API doc, there is no rank system ID in rank API. Can’t tell how it works.

Best,
gs3

This is an example of how to update an existing ranking system. There is no ranking system id mentioned in the API docs because this only works on the ranking system named APIRankingSystem. This is a ranking system that the DataMiner/API uses whenever there is a ranking system created on the fly in your scripts. The API will automatically create this ranking system if you don’t already have it created.

Sample script that changes APIRankingSystem to have a single factor Pr2SalesTTM:

import p123api
try:
client = p123api.Client(api_id=‘xx’, api_key=‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’) #add your id and key here

#To create the nodes line, I manually created a simple ranking system. Go to the text editor for that ranking system and copy the text/XML.
#Paste that text into nodes below. You also have to escape every quote that appears in the text by putting a \ in front of it.
#Also put it all on one line else get line break errors. Or you can add \ to the end of each line like I did.
data = {
    "type": "stock",
    "rankingMethod": 2, #2 - Percentile NAs Negative, 4 - Percentile NAs Neutral
    "nodes": "<RankingSystem RankType=\"Higher\"><StockFormula Weight=\"100%\" RankType=\"Lower\" \
        Name=\"Pr2SalesTTM\" Description=\"\" Scope=\"Universe\"><Formula>Pr2SalesTTM</Formula></StockFormula></RankingSystem>"
}

dict = client.rank_update(data)

except p123api.ClientException as e:
print(e)

Hi all,

What the current limits for the API? Is there still a hard 5k limit pr month?

I am considering upgrading my membership from Portfolio to Ultimate, will this increase my API request limit?

Regards,
Ole Petter

We’re rolling out new limits and ways to increase those limits later this week. We’ll be posting more about this shortly, but in sum, you will be able to buy more API requests no matter what your membership is, and the subscription limits are as follows: Screener: 250 requests/mo; Backtest: 500 requests/mo; Portfolio 1,000 requests/mo; Ultimate: 10,000 requests/mo. The prices for additional requests are as follows: 5,000 extra requests/mo = $50; 50,000 extra requests/mo = $200; 500,000 extra requests/mo = $500. The API limits will change later this week. In addition, we are making changes to how the requests are calculated. While most DataMiner operations will still be one request per iteration, a few operations will be calculating the requests differently so that you can get a lot more information per request.

This sounds like a good solution - thanks!

Ole Petter

Awesome news!

Just to confirm my understanding before I waste more time on this, one rank for a single factor for a single stock on a single date counts as 1 API request? Or is it one rank for a single factor for all stocks on a single date counts as 1 API request?

I believe that one API request (one date) regardless of how many stocks is considered to be one request. So if I were to download 5 years of weekly data, that would amount to 5 x 52 = 260 API requests. My understanding is that there are hourly and monthly restrictions and you will burn up your resources very quickly. In this thread, P123 announced that they were going to revisit this and potentially revise how the resources are counted for ML applications. But I haven’t heard anything yet.

An API call will count for at least one request. So requesting a single factor for a single stock for a single date would be “expensive”. API’s that download data the # of requests is computed based on data points retrieved. Like 5000 is one API request I think

This is all being hashed out at the moment! We will post precise info soon . Let us know then and we will be accommodating and sensical. We want people to use this.

Thanks

Don’t want to speak for everyone else but for me, I’d like to pull 20 factors for 3000 stocks on a weekly basis for 5 to 10 years. That would be the same amount of data used in a single simulation run for me anyways.

If I understand correctly, 3000 stocks for one week for one factor ~ one API request. So to do what I want I need 1 API request * 20 factors * 52 weeks * 10 years = 10,000 API requests…

This doesn’t work I get this error. Can you please provide the working code plz:

2020-12-24 15:13:07,294: Output is empty
2020-12-24 15:13:07,289: Iteration 1/1 run 1/2: failed
2020-12-24 15:13:07,288: API request failed: ERROR: Ranking failed on 01/01/2000: Cross sectional formula functions only be used relative to ‘Universe’ in ranking systems

Main:
Operation: RankPerformance
On Error: Stop

Default Settings:
Vendor: Factset
PIT Method: Prelim
Buckets: 1
Start Date: 2000-01-01
End Date: 2020-12-21
Rebalance Frequency: 4Weeks
Universe: International Equity Strategy
Benchmark: VEA
Minimum Price: 1

Iterations:
-
Name: EarnYield_I #Industry 1
Ranking:
Nodes:
-
Type: StockFormula
Name: a
Formula: “Aggregate("EarnYield",#Industry,#Avg,16.5,#Exclude,False,True)”
Rank: Higher
Scope: Industry

Hello,

I wanted to know if you would allow us to use FHist with negative values to get technical data with the API for users without data license?
Currently, there is no way to get future volume for example. Want to try it as well as other data as labels in ML models.

FHist support both positive or negative values. The documentation was updated (but perhaps not clear enough?)

However Volume factors & functions need not be restricted. It’s technical data and it does not come from Factset. So it would be similar to what we did with FutureRel%Chg & Future%Chg. You can get the exact future values.

Can you give an example of what future volume metric you need?

I would like to buy more API requests, but from the other API thread I see that P123 is planning to go from a subscription model to a “a la carte” model, when will this happen? Should I just upgrade my API subscription now, or should I wait for the new system? (Also I get an error message telling me that I’ve reached my API limit when trying to download data, even though I’m supposed to have 1k request remaining for the month).

Apparently tomorrow Marco told me today. I want to buy the 500K requests package but it’s not available yet. Let’s check back tomorrow if the option appears.

Marco,

Using the “additionalData” option with this function: (any function within FHist)
FHist(“AvgVol(20)”, -4)

returns “A data license is required for this operation”

My understading is that it should not

Looks like it’s in place now - I think I’ll go for the 500K option right away :slight_smile: