2014年7月17日星期四

Coded UI Playback Configuration



How to Config a TestMethod's Playback Timeout Length
To set a specific time length
[Timeout(int milliseconds)]

To make it run as long as it needs.
[Timeout(Microsoft.VisualStudio.TestTools.UnitTesting.TestTimeout.Infinite)]


Few tips on implementing a Coded UI Test Plugin Extension

2014年7月15日星期二

Loading System.ServiceModel configuration section using ConfigurationManager



// Automagically find all client endpoints defined in app.config
ClientSection clientSection = 
    ConfigurationManager.GetSection("system.serviceModel/client") as ClientSection;

ChannelEndpointElementCollection endpointCollection =
    clientSection.ElementInformation.Properties[string.Empty].Value as     ChannelEndpointElementCollection;
List endpointNames = new List();
foreach (ChannelEndpointElement endpointElement in endpointCollection)
{
    endpointNames.Add(endpointElement.Name);
}
// use endpointNames somehow ...

http://mostlytech.blogspot.com/2007/11/programmatically-enumerate-wcf.html

2014年5月1日星期四

Deepth things about Lending Club


How to get Foliofn loan data?

https://www.lendingclub.com/foliofn/notesRawData.action 

2014年4月1日星期二

Lendingclub Real Historical Data Analysis


I do not trust various online lending analysis tools any more because their results are too different (actually I do not know which one I should believe in). Their magic analysis methods are not public (I am too stupid to guess them out). So today I tried doing some simple analysis with Excel on the data I directly download from lendingclub.com

Analysis Results
I applied my filter to the historical data from 2012-1-1 ~ 2013-6-30 (1.5 years duration).

The total issued loan comply with my filter conditions were 2722. And the bad loans among them were 148 so far. In terms of how I count bad loans, I query the load_status are Charged off, Default or Late 31~120 days.

I learned from lending academy there are some interesting data inside the downloaded loan data which you could not see on lendingclub's webpage and I found them.

- mort_acc: how many mortgages the borrower had when apply loan.
- total_bal_ex_mort: total mortgages balance

I checked those two data average for loans/defaulted under my filter conditions.

Total average mort_acc: 2.27
Total average total_bal_ex_mort: 33800

Default average mort_acc: 2.4
Default average total_bal_ex_mort: 35815

It's not obvious those two fields are useful for loan filtering.

Following is how the loan distribute by grade using my load condition. Looking at that, I should exclude F- from my filter conditions.

Grade Total Bad Bad Rate
C 1886 82 4.3%
D 527 40 7.6%
E 230 13 5.7%
F 75 13 17.3%
G 4 0 0.0%


Next Steps
It's really not convenient to use Excel to do analysis. I will create a database to do data analysis in the next couple of months.

I have not had time to look into how to count loan profit and loss for different status. I should research how it works over time.

There are some data columns inside the downloaded tabular data file I still do not understand what their meaning is. I will try to figure them out over time.



2014年2月15日星期六

Lending analysis tools bug list


nickelsteamroller


  1. Some filter fields does not work for Lending Club foliofn search, e.g. "Months Since Recent Revol Delinq", "Public Records"

2014年2月7日星期五

Lending Club Notes



  • New Notes are listed seven days a week at 6 AM, 10 AM, 2 PM, and 6 PM PT.

Filter Sample

  • $2000-$35,000 Loans
  • E-G Grade
  • Purpose: Only Debt Consolidation/Credit Cards
  • $60,000 income/year
  • 10+ Years of Employment
  • Max 20% Debt-to-Income Ratio
  • 5+ Open Credit Lines
  • 10+ Total Credit Lines
  • No Inquiries
  • No Public Records
  • Max 95% Credit Utilization
  • Exclude CA & FL

How to construct filter? 

A Lending Club Filter

Article 1 (It's advertisement, but something is worth of learning)

TERMS

What is the difference between a loan that is in “default” and a loan that has been “charged-off”?

A loan that is in “Default” is a loan for which a borrower has failed to make a payment for an extended period of time.  A loan becomes “Charged Off” when there is no longer a reasonable expectation of further payments.  A loan that is in “Default” will still appear in your Notes, in the status of “Default,” while a loan that has been “Charged Off” will appear as charged off, and the remaining principal balance of the Note will be deducted from your account balance.

In general, a note enters Default status when it is 121+ days past due. When a note has entered Default status, Charge Off occurs no later than 150 days past due (i.e. No later than 30 days after the Default status is reached) when there is no reasonable expectation of sufficient payment to prevent the charge off. Please note, bankruptcies may be charged off earlier based on date of bankruptcy notification.
This article covers almost all the things about investing P2P loan.

2013年12月10日星期二

Interview Coding Question - Fibonacci

Fibonacci number


Recursive solution
int fib(int n)
{
  if (n < 2)
    return n;
  else
    return fib(n-1) + fib(n-2);
}




Iterative solution 1
int fib(int n)
{
int fibArray [MAXINT], i;
fibArray [0] = 0; fibArray [1] = 1;
for (i = 2; i <= n; i++)
    fibArray [i] = fibArray [i-1] + fibArray [i-2];
return fibArray [n];
}

Iterative solution 2

int fib(int n)
{
  int first = 0, second = 1;
  int i, tempSum;
  for(i = 2; i <= n; i++)
  {
    tempSum = first + second;
    first = second;
    second = tempSum;
  }
  return second;
}

序言