Author Topic: I am a high frequency secondary market trader - ask me anything  (Read 692 times)

lendingmachine

  • Newbie
  • *
  • Posts: 8
    • View Profile
Greetings,

I'm an individual investor who makes extensive use of lendingclub's api for trading notes on the secondary market.  I have made approximately 40,000 trades in the last year and my ROI for 2018 was approximately 26% on a 100k portfolio.  Many of the strategies I use cannot be scaled up though.  I would expect as I invest more capital my returns would level out around 12-16%, although it is hard to say because I have put the majority of my time and energy into optimizing the performance of the capital I have available.     I have likely put in close to 1000 hours of time to develop this trading program.  Everything is written in python.  The buy side runs on gcloud instances in a linux environment and the sell side happens from my home computer.
     While I cannot give away the most specific details of my trading strategy, I hope that I can answer any questions people might have and perhaps find a few people to collaborate with.  I do have a system in place to get lightning fast execution on purchasing notes on the secondary market.  The key is to have a buy price already calculated for every note on the platform.  I have collected the data that lendingclub releases monthly for the last two years so that I have a database of fico score trends for every note.  A large portion of the pricing model I use looks at the pattern of fico scores as well as measuring volatility of the fico score.  Factors such as income and credit history matter two, but once a note has 18-24 months of payments under its belt I have found the highest correlations of performance with fico trend and interest rates.  I run about 20 different strategies and I am trying out new ones all the time.

Profit comes from four main areas:

     1) Buying grossly underpriced notes.  Notes are frequently listed for sale on the secondary market that are grossly underpriced, but they are snatched up in milliseconds.  Being the first to purchase these is highly profitable, but limited in scope.  I estimate that with perfect execution one could make approximately $40k per year from this

     2) Spread between buy price and sell price on normal notes.  I am constantly listing my inventory for sale at 3-5% over the price I pay of the notes (of course this would be much higher if I bought the loan at a larger discount).  I could theoretically lower this margin to anything over 1% fee lendingclub charges for sales.  However any shortcoming in my model could theoretically be exploited by others with such a low spread.  3-5% gives me plenty for margin of safety and allows me to buy and sell about 100 notes a day.

     3) Returns from a refined portfolio.  I have gradually accumulated the majority of my holdings in a portfolio of loans that is 17% return or greater and greater than 60 change in fico score.  I sell the notes automatically that drop in fico score and my default rate on this portfolio is very low.  I am in the process of accumulating more notes that are in professions that would be resistant to a recession or downturn in the economy.

     4) Buying and selling delinquent notes.  Everything from grace period to notes about to default.  The market for these notes swings pretty wildly.  These strategies are limited due to the limited amounts of notes available but some of my strategies have yielded over 100% ROI on an principle of several thousand dollars.


I am considering putting more capital into this project but I am hesitant to have all of my eggs in one basket.  I am looking for good ways to hedge against a recession, and the increased unemployment and defaults that would come along with it.  I have considered buying SPY Put options at a 30-40% lower strike price than the spot price.  Other possibilities would be put options for lendingclub itself and for a consumer discretionary sector ETF.  If any financial pros have other suggestionsl I would be very eager to hear them.

I am starting to buy some notes on the primary market to see what kind of return I can get.  This strategy will involve selling both highly performing and underperforming notes on the secondary market for a profit, but only buying notes on the primary market.  The return I generate from this strategy could theoretically be scaled up much higher and perhaps later on I could offer a product to invest money on behalf of others.


I'm open to any questions.  I'm will try to be as specific as I can in my responses to the extent that it would not generate competition for myself.  I really do love this work I am doing.  When I've played mmorpgs in the past my favorite part has always been the auction house or the in game economy.  I feel like this project has allowed me to channel that same creativity and drive.

Ask me anything

JRubin84

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #1 on: January 22, 2019, 12:33:51 PM »
It sounds like you have a very smart strategy.  Are you making specific decisions about buying and selling individual notes, or programming an algorithm to automatically do this for you?

mikedev10

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: I am a high frequency secondary market trader - ask me anything
« Reply #2 on: January 22, 2019, 04:49:59 PM »
it is interesting that you have started with a price you are willing to pay beforehand.  how are you connecting that with the loans you are evaluating?  is this just something like a dataframe merge?

you noted loans snapped up in "milliseconds" - how frequently are you running your process?  how did you even notice something being snatched up that quickly?  the most i run is once every 30 minutes!

have you separated out your notes to hold inventory with the ones you put up for sale, or are they always up for sale to someone who is willing to pay 5% more than you did?  is this just under the theory that a no risk 5% right now improvement is always worth it?  are these notes acquired at big discounts to start?

are you buying fractional notes on the primary market via the api or via the auto-invest?  or do you plan on signing up for the whole loan purchase program?

lendingmachine

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #3 on: January 22, 2019, 05:47:38 PM »
It sounds like you have a very smart strategy.  Are you making specific decisions about buying and selling individual notes, or programming an algorithm to automatically do this for you?

I don't make individual decisions on notes unless they are at a high face value and close to the price that I would buy it at.  If its a high priced borderline note like this I have my program send me an sms alert to my phone.  For everything else the orders go through automatically

lendingmachine

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #4 on: January 22, 2019, 05:57:52 PM »
it is interesting that you have started with a price you are willing to pay beforehand.  how are you connecting that with the loans you are evaluating?  is this just something like a dataframe merge?

you noted loans snapped up in "milliseconds" - how frequently are you running your process?  how did you even notice something being snatched up that quickly?  the most i run is once every 30 minutes!

have you separated out your notes to hold inventory with the ones you put up for sale, or are they always up for sale to someone who is willing to pay 5% more than you did?  is this just under the theory that a no risk 5% right now improvement is always worth it?  are these notes acquired at big discounts to start?

are you buying fractional notes on the primary market via the api or via the auto-invest?  or do you plan on signing up for the whole loan purchase program?

yes I am doing a dataframe merge, which is quite fast with pandas.  I update the list once per month when new credit scores come out.  I also detect if there is a change in fico score since my model priced the note.

New notes are listed approximately every 2-3 minutes via the api.  SecondaryMarketAllNotes.csv is updated less frequently but at least every 5 minutes. 

I check for new notes very frequently.  I can notice that a note is snatched up quickly when I put in an order a fraction of a second after the notes are listed and they come back as not available.  For example a note with no late payments will be bought very quickly for a 20% discount regardless of what type of note it is.  I used to only get a small fraction of these notes but I'm capturing more now.


"have you separated out your notes to hold inventory with the ones you put up for sale, or are they always up for sale to someone who is willing to pay 5% more than you did?  is this just under the theory that a no risk 5% right now improvement is always worth it?  are these notes acquired at big discounts to start?"
I did this at first.  Then I figured what the heck, why not mark them up 10-15%.  To my suprise some of the most premium notes are regularly purchased at 15% markup (especially notes with ficoscore changes over +100 with rates over 24%).  This spawned a whole new strategy since at first I didn't think anyone would pay such a premium.  The notes I want to keep I usually mark up an extra 10% and figure I'll keep most of them and make a quick profit on the rest.


I'm buying fractional notes on the primary market with the api.  I don't have the capital to purchase whole notes.  I just started doing the primary market a few months ago so it will be a while before I can say what kind of returns I would get.  It was incredibly easy to implement primary market purchasing via api compared to the trading and valuation I'm doing with loans on the secondary market.

mikedev10

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: I am a high frequency secondary market trader - ask me anything
« Reply #5 on: January 23, 2019, 01:42:35 AM »
yes I am doing a dataframe merge, which is quite fast with pandas.  I update the list once per month when new credit scores come out.  I also detect if there is a change in fico score since my model priced the note.

how big is your frame of prices you like that you are merging with the newly listed notes?  i haven't tried to do anything like that, but just reading a csv that large would seem to take a good chunk of time!
Quote
New notes are listed approximately every 2-3 minutes via the api.  SecondaryMarketAllNotes.csv is updated less frequently but at least every 5 minutes. 

do you read both?

Quote
I check for new notes very frequently.  I can notice that a note is snatched up quickly when I put in an order a fraction of a second after the notes are listed and they come back as not available.  For example a note with no late payments will be bought very quickly for a 20% discount regardless of what type of note it is.  I used to only get a small fraction of these notes but I'm capturing more now.

lol why is anyone even selling a note like that?

Quote
"have you separated out your notes to hold inventory with the ones you put up for sale, or are they always up for sale to someone who is willing to pay 5% more than you did?  is this just under the theory that a no risk 5% right now improvement is always worth it?  are these notes acquired at big discounts to start?"
I did this at first.  Then I figured what the heck, why not mark them up 10-15%.  To my suprise some of the most premium notes are regularly purchased at 15% markup (especially notes with ficoscore changes over +100 with rates over 24%).  This spawned a whole new strategy since at first I didn't think anyone would pay such a premium.  The notes I want to keep I usually mark up an extra 10% and figure I'll keep most of them and make a quick profit on the rest.

thanks that is interesting!

Quote
I'm buying fractional notes on the primary market with the api.  I don't have the capital to purchase whole notes.  I just started doing the primary market a few months ago so it will be a while before I can say what kind of returns I would get.  It was incredibly easy to implement primary market purchasing via api compared to the trading and valuation I'm doing with loans on the secondary market.

that's what i figured - so few loans come out on the primary platform that i find it frustrating and annoying though.  i have pretty strict rules on when i want to buy there and they never actually trigger.  so i'm essentially going to folio to have a larger market to evaluate to find the things i like.

lendingmachine

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #6 on: January 23, 2019, 12:01:29 PM »
how big is your frame of prices you like that you are merging with the newly listed notes?  i haven't tried to do anything like that, but just reading a csv that large would seem to take a good chunk of time!

I keep the dataframe in memory.  It is just LoanID, purchase markup price, expected credit score and starting credit score in the dataframe so its under 20 megabytes.  You are right, reading it into memory from a disk would be too slow

Quote
New notes are listed approximately every 2-3 minutes via the api.  SecondaryMarketAllNotes.csv is updated less frequently but at least every 5 minutes. 

do you read both?

I do.  SecondaryMarketAllNotes.csv is big so wrote some low level code to only download the last 32kb of the file so I can detect changes more often.  If there is a change then I download the entire file.  If it was possible to know the exact time the file is updated i wouldn't have to do this but since there is no fixed interval it pays to scan frequently.

Quote
I check for new notes very frequently.  I can notice that a note is snatched up quickly when I put in an order a fraction of a second after the notes are listed and they come back as not available.  For example a note with no late payments will be bought very quickly for a 20% discount regardless of what type of note it is.  I used to only get a small fraction of these notes but I'm capturing more now.

lol why is anyone even selling a note like that?

It happens a lot.  Some people are liquidating, some people are clueless as to the value and some people simply make mistakes.  I imagine it is frequently more than one of these.  I used to immediately resell these kind of notes for a profit.  Instantly reselling at a 10% discount would usually be possible, but now I just have my model price them and hold them as long as it takes to sell.

mikedev10

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: I am a high frequency secondary market trader - ask me anything
« Reply #7 on: January 23, 2019, 01:13:23 PM »
I keep the dataframe in memory.  It is just LoanID, purchase markup price, expected credit score and starting credit score in the dataframe so its under 20 megabytes.  You are right, reading it into memory from a disk would be too slow

so my program i run every 30 or 60 min spins up python, does it's thing, it's all quite heavy particularly compared to yours given that i do things with snowflake database on it now too.  is your process long running, ie. you create your frame on disk once a day, then you read it, and your program just runs the next 23 hours and you are running, sleeping 10 sec or something, then hitting the api again?  at some frequency isn't the lc api highly annoyed at you?

Quote
I do.  SecondaryMarketAllNotes.csv is big so wrote some low level code to only download the last 32kb of the file so I can detect changes more often.  If there is a change then I download the entire file.  If it was possible to know the exact time the file is updated i wouldn't have to do this but since there is no fixed interval it pays to scan frequently.

why are you doing both, sounded like above you didn't think the api missed anything? 

thanks for the comments, it makes me rethink my own design.  i could probably do my snowflake stuff differently and ahead of time and minimize the costs i spend running anything on the platform.  even at the smallest size, it's overkill for something like a lil folio tradey bot.

rawraw

  • Hero Member
  • *****
  • Posts: 2756
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #8 on: January 23, 2019, 06:41:57 PM »
We used to have a user Core who had 100% returns on Folio doing trading.  But his strategy was at capacity with 20k or something.

If you want to hedge, just find another large consumer lender.

lendingmachine

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #9 on: January 24, 2019, 12:27:26 PM »
I keep the dataframe in memory.  It is just LoanID, purchase markup price, expected credit score and starting credit score in the dataframe so its under 20 megabytes.  You are right, reading it into memory from a disk would be too slow

so my program i run every 30 or 60 min spins up python, does it's thing, it's all quite heavy particularly compared to yours given that i do things with snowflake database on it now too.  is your process long running, ie. you create your frame on disk once a day, then you read it, and your program just runs the next 23 hours and you are running, sleeping 10 sec or something, then hitting the api again?  at some frequency isn't the lc api highly annoyed at you?

the LC api limites you to one request per second.  I run my program on google cloud instances that last for 24 hours each (much cheaper than permanent instances), so it just reads the file at the beginning of the day and then everything is in memory for fast execution.  Locating the virtual machines as close as possible to the lending club servers is important too.

Quote
I do.  SecondaryMarketAllNotes.csv is big so wrote some low level code to only download the last 32kb of the file so I can detect changes more often.  If there is a change then I download the entire file.  If it was possible to know the exact time the file is updated i wouldn't have to do this but since there is no fixed interval it pays to scan frequently.

why are you doing both, sounded like above you didn't think the api missed anything? 

there is a delay between when the api is updated and when secondarymarketallnotes.csv is updated.  I still get a small amount of loans from downloading the file (its updated sometimes 20-40 seconds after the api and in that time there can be some new notes that are listed that will show up on the .csv but not the api). 

thanks for the comments, it makes me rethink my own design.  i could probably do my snowflake stuff differently and ahead of time and minimize the costs i spend running anything on the platform.  even at the smallest size, it's overkill for something like a lil folio tradey bot.

yah sometimes I think what I've done has been a bit of overkill but I'm hoping I can grow it into something bigger

lendingmachine

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #10 on: January 24, 2019, 12:30:16 PM »
We used to have a user Core who had 100% returns on Folio doing trading.  But his strategy was at capacity with 20k or something.

If you want to hedge, just find another large consumer lender.

Lendingclub seems to be the only consumer lender with a robust secondary market.  I have some money on prosper and mintos but there are not the same trading opportunities as lending club.  Finding another large consumer lender would provide diversification but no the hedge I'm looking for.  By hedging I meant protecting myself from a big loss if the economy as a whole tanks and consumers are unable or unwilling to pay back their loans.


100% return on 20k is impressive but definitely doable from what I've seen.  Finding strategies that scale is the difficult part

rawraw

  • Hero Member
  • *****
  • Posts: 2756
    • View Profile
Re: I am a high frequency secondary market trader - ask me anything
« Reply #11 on: January 24, 2019, 12:57:21 PM »
My point was that if you find a large consumer lender who is publicly traded, you can hedge it that way

mikedev10

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: I am a high frequency secondary market trader - ask me anything
« Reply #12 on: January 25, 2019, 01:27:46 AM »
We used to have a user Core who had 100% returns on Folio doing trading.  But his strategy was at capacity with 20k or something.

If you want to hedge, just find another large consumer lender.

Lendingclub seems to be the only consumer lender with a robust secondary market.  I have some money on prosper and mintos but there are not the same trading opportunities as lending club.  Finding another large consumer lender would provide diversification but no the hedge I'm looking for.  By hedging I meant protecting myself from a big loss if the economy as a whole tanks and consumers are unable or unwilling to pay back their loans.


100% return on 20k is impressive but definitely doable from what I've seen.  Finding strategies that scale is the difficult part

how is mintos?  do they have a nice api and history to download?  worth getting into?

wiseclerk_com

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • P2P-Banking.com
Re: I am a high frequency secondary market trader - ask me anything
« Reply #13 on: January 27, 2019, 06:35:47 AM »


I am considering putting more capital into this project but I am hesitant to have all of my eggs in one basket.

Quote from: rawraw
We used to have a user Core who had 100% returns on Folio doing trading.  But his strategy was at capacity with 20k or something.

If you want to hedge, just find another large consumer lender.

@lendingmachine
Consider diversifying on another platform.
Bondora has API and loanbook download with many parameters too. Bondora is open to accredited investors in the US.
I don't personally use it for trading right now (i used to in 2014-2015), but I know several people that have written and run their own tools for automated trading on Bondora.
I publish the http://www.p2p-banking.com blog