Author Topic: Folio buying automation execution speed  (Read 3018 times)

last1bidding

  • Newbie
  • *
  • Posts: 4
    • View Profile
Folio buying automation execution speed
« on: July 27, 2017, 08:44:55 AM »
I am working on automating secondary market trading (only buying for now) and was wondering how fast does my execution speed have to be to pick up deeply discounted notes?  Anyone else running into the best notes in NOT_AVAILABLE status? 
A little background: Iím using python to process SecondaryMarketNote csv file to filter for notes that meet my filter criteria. Started with a very restrictive criteria and found some deeply discounted notes that were gone before my API buy order went through.  My download speed is atrocious so I donít think itís worth trying to chase these but was curious what download frequency and execution speed would pick these up?  Iím sure whomever is getting these notes probably wonít want to chime in.  Anyone else see these notes, try and fail to get them?

Fred93

  • Hero Member
  • *****
  • Posts: 2221
    • View Profile
Re: Folio buying automation execution speed
« Reply #1 on: July 27, 2017, 03:17:00 PM »
After dealing with this issue myself, I can say that I don't know the answer, and wonder if you (and I) are even asking the right question.

I average about half NOTE_NOT_AVAILABLE result on my secondary orders.  I recently sent a query to LC asking if my interpretation of that status is correct.  I've been presuming that it means someone bought the note before I could.  However I now question whether that is correct, so I wanted to ask them whether perhaps there is something else going on.  I've tried varying my polling interval, and find that makes no difference when averaged over a few days.  It seems logical that a shorter polling interval would increase the fraction of the time that I get in there ahead of the competition, but it seems to not work that way in practice.

For me 99% of the delay between query and order is the download time.  Download time is determined mainly by the latency of the internet path between me and LC.  This is true because of the TCP slow-start mechanism.  All transfers begin slow and ramp up. 

Faster polling doesn't seem to improve my results, so perhaps the issue is something different.

kuhnrl30

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • R Package for Lending Club
Re: Folio buying automation execution speed
« Reply #2 on: December 18, 2017, 01:27:27 PM »
It'd be nice if we could use a filter before downloading the entire ~70mb file each time. 

hdsouza

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Folio buying automation execution speed
« Reply #3 on: December 20, 2017, 07:23:43 PM »
Yes . I started off with the same problem.. Atrocious download and processing speeds.. but like kuhnrl30 mentioned you have to filter and then download. The downside to that is you have to login to the site, although thats worth it.
You can drop the time futher by comparing the current download file to the previous download file and get the difference of Notes added. I started off with a process time of 30 minutes and Its now, after several modifications its between 1-2 minutes.
« Last Edit: December 20, 2017, 07:25:14 PM by hdsouza »

mark78

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • Email
Re: Folio buying automation execution speed
« Reply #4 on: February 03, 2018, 06:05:45 AM »
I followed the same path as hdsouza and agree with his comments. Login, filter, diff, and analyze. I pull the new filtered notes, analyze, and buy any good ones. And I'm not getting the best notes by any stretch of the imagination.

I think you could answer this question by trying to buy notes from yourself. Select one of your own notes to sell. You already know the noteId, orderId, and loanId, and AskPrice. Put it up for sale at a high price, and immediately try to buy it- you should succeed. Now put it up for sale at increasingly lower prices. At some point, you might find that someone buys it before you, even though you knew the details in advance.

I'm planning on trying this test soon. Would be interested if anyone else wants to try it too.
« Last Edit: February 14, 2018, 03:24:52 PM by mark78 »

apc3161

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Re: Folio buying automation execution speed
« Reply #5 on: February 08, 2018, 06:27:46 AM »
I followed the same path as hdsouza and agree with his comments. Login, filter, diff, and analyze. After a lot of work it's down to 0.5 seconds. Twice a second, I pull the new filtered notes, analyze, and buy any good ones. And I'm not getting the best notes by any stretch of the imagination.

I think you could answer this question by trying to buy notes from yourself. Select one of your own notes to sell. You already know the noteId, orderId, and loanId, and AskPrice. Put it up for sale at a high price, and immediately try to buy it- you should succeed. Now put it up for sale at increasingly lower prices. At some point, you might find that someone buys it before you, even though you knew the details in advance.

I'm planning on trying this test soon. Would be interested if anyone else wants to try it too.

Can you clarify on "Login, filter, diff, and analyze.". As far as I know, there is just a CVS file you have to download then analyze, then purchase notes via their API. Where is this "login" part?

kuhnrl30

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • R Package for Lending Club
Re: Folio buying automation execution speed
« Reply #6 on: February 08, 2018, 01:07:57 PM »
LC has added new endpoints to their folio API.  You can now pull all notes updated in the past X minutes (you supply the X).  That should drastically reduce your download time if you pull only what has been updated in, say, the past 1 minute.  They're still working on the documentation so it's not on the site yet.  The API is working so you can ask them for the docs.

apc3161

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Re: Folio buying automation execution speed
« Reply #7 on: February 16, 2018, 04:33:03 PM »
LC has added new endpoints to their folio API.  You can now pull all notes updated in the past X minutes (you supply the X).  That should drastically reduce your download time if you pull only what has been updated in, say, the past 1 minute.  They're still working on the documentation so it's not on the site yet.  The API is working so you can ask them for the docs.

So is the previous strategy of downloading the CVS file and filtering it no longer how it's done?