Serving the Quantitative Finance Community

 
User avatar
Searay
Topic Author
Posts: 10
Joined: May 18th, 2014, 4:55 pm

Flow-of-funds data source

January 3rd, 2024, 4:31 pm

I'm looking for timely data on 'fund flows' and perhaps more importantly, price level triggers for buy/sell programs in the usual equity index & bond futs, whether in simple tabular format on a webpage, or preferably via API, in the following areas:

1) Pension/401k fund monthly rebalancing
2) Corp buyback desks (Goldman? Morgan Stanleys QDS?)
3) CTAs (price level triggers are especially pertinent here)
4) Vol control funds
5) NAAIM Index values

Currently I can get access to most of it in modest-resolution chart form, which has led me to try some open-source OCR/image processing stuff, but haven't aced it yet.

Any ideas on a good source for this? I've only contacted 1 prospective vendor so far, but the usual suspects are being checked with too (Bloomberg, S&P Capital IQ, Refinitiv/LSEG).
 
User avatar
Searay
Topic Author
Posts: 10
Joined: May 18th, 2014, 4:55 pm

Re: Flow-of-funds data source

January 3rd, 2024, 5:19 pm

Slight revision (too late to edit OP): I see EPFR and LSEG as other possible sources...and looks like Cap IQ doesn't offer this type of data.

I'm a 1-man shop, so a monthly cost under $1k would be kewl, though that's wishful thinking with vendors mentioned already.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Flow-of-funds data source

January 6th, 2024, 6:24 pm

I suspect you haven't invested enough effort of your own into this. 

For example, I had never heard of 5). 
Two minutes googling turned up this page, which has a downloadable excel file that apparently is maintained. 
You could probably write a simple python program to automate the download -- or ask MS/Copilot(ChatGPT) to do so for you. Usually, the code doesn't work out of the box, but it should be fixable.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Flow-of-funds data source

January 6th, 2024, 6:46 pm

Just to make sure my advice works, I just gave Copilot the prompt
"I need a Python program that downloads an excel file, where I have the url for the file."  It produced something similar to this:
# DLTest.py

import requests
import os
import os.path

save_path = 'D:/Downloads/temp.xlsx'
url= "https://www.naaim.org/wp-content/uploads/2024/01/USE_Data-since-Inception_2023-01-03-1.xlsx"

def download_excel_file(url, save_path):
    try:
        response = requests.get(url)
        if response.status_code == 200:
            with open(save_path, 'wb') as file:
                file.write(response.content)
            print(f"File downloaded successfully and saved at {save_path}")
        else:
            print(f"Error: Unable to download the file. Status code: {response.status_code}")
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    download_excel_file(url, save_path)
 
User avatar
Searay
Topic Author
Posts: 10
Joined: May 18th, 2014, 4:55 pm

Re: Flow-of-funds data source

January 6th, 2024, 7:10 pm

Thank you for replying, Alan. Re: effort, I have with #s 1-4; #5 is the only come-lately one I tacked on after rounds of searching. I know that Goldman and Morgan Stanley's teams publish most of these types of data, but it's only to their HNW clients. I see occasional data for 1, 2 and 4 from BofA's Global Research division, but it's not consistent & timely enough.

Thanks also for the Python code example. I've used GPT4 several times in the past few months, for simple webpage scraping and simple file download tasking, just like this.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Flow-of-funds data source

January 6th, 2024, 7:28 pm

You're welcome. So, with 1-4, what exactly are you looking for?
 
User avatar
Searay
Topic Author
Posts: 10
Joined: May 18th, 2014, 4:55 pm

Re: Flow-of-funds data source

January 6th, 2024, 10:17 pm

I'm looking for raw data, no more than 7 days old, like what can be seen in these example images:

1) https://assets.zerohedge.com/s3fs-publi ... k=B6iPgaXZ
2) https://tme2.nyc3.cdn.digitaloceanspace ... 2e53d1.png
3) https://tme2.nyc3.cdn.digitaloceanspace ... b39657.png (the values listed are per Goldman)
4) https://tme2.nyc3.cdn.digitaloceanspace ... ca0ce3.png
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Flow-of-funds data source

January 6th, 2024, 11:59 pm

Take 2). 

A little googling suggests to me that the net corporate buy-backs are estimated by tracking the changes in shares issued off the quarterly reports. Now there is a lot of work already done on detecting/reading SEC filings in a timely manner.  In fact, the other day, I ran across this API offering. (I haven't used it). But if I wanted 2) in a timely manner, I would try to use that API to detect new SEC filings, extract any changes in shares issued, and use that to construct what you want. It's probably going to be a lot of work,  but should be cost effective.

Similarly, for the other stuff. Figure out what exactly is the definition of the thing. Then, what are the raw sources? Then, how can you programmatically extract it?

Anyway, my two cents. Good luck.
 
 
User avatar
Searay
Topic Author
Posts: 10
Joined: May 18th, 2014, 4:55 pm

Re: Flow-of-funds data source

January 7th, 2024, 12:12 am

I appreciate your take/logic here i.e. figure the base-definition of the matter...and, in the case of a Goldman or a UBS publishing a chart or data with projection of upcoming buyback activity, it could be as simple a case as they're looking at historical relationships among:
 -  HYG credit
 - Treasury yields
 - the overall equity index valuations (i.e. how rich/cheap is it)
 - a ratio of how much $$ was reported for allocation to buybacks at time of any given company's quarterly report, and its stock price around that time

...I suppose I could give all that a try, but TBH I'd much rather ride coattails, given the need to wear multiple hats...but if the knuckle-down ground-level approach you espouse is what it takes, then alright. Iteration/recalibration would certainly be needed, in light of the fact that different banks/HFs differ in their estimated values of amount and threshold-levels...and they've got several people dedicated to assessing these projections & the compute power handling forecasts.