Prospers.ORG Prosper Forum

Advanced search  

News:

Welcome to Prospers.ORG!   Login here

Pages: [1]   Go Down

Author Topic: APR Variance by CreditGrade  (Read 2540 times)

sb92075

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 148
    • View Profile
APR Variance by CreditGrade
« on: January 17, 2008, 08:01:46 pm »

Code: [Select]
select CreditGrade, min(BorrowerRate), max(BorrowerRate) from Loan
where OriginationDate > '2007-12-01' and OriginationDate < '2008-01-01' group by CreditGrade
+-------------+-------------------+-------------------+
| CreditGrade | min(BorrowerRate) | max(BorrowerRate) |
+-------------+-------------------+-------------------+
| A           |              0.08 |              0.23 |
| AA          |             0.065 |              0.24 |
| B           |              0.09 |            0.2749 |
| C           |               0.1 |              0.35 |
| D           |              0.01 |              0.35 |
| E           |            0.0761 |              0.35 |
| HR          |              0.04 |              0.35 |
+-------------+-------------------+-------------------+
Logged

prospitrage

  • Jr. Member
  • **
  • Karma: +0/-0
  • Posts: 91
    • View Profile
Re: APR Variance by CreditGrade
« Reply #1 on: January 21, 2008, 10:27:04 am »

This is a range calculation.  Do you mind doing the variance calculation?

Edited to add request for variance calc.
Logged

sb92075

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 148
    • View Profile
Re: APR Variance by CreditGrade
« Reply #2 on: January 21, 2008, 02:07:00 pm »

Code: [Select]
select CreditGrade,
          round(min(BorrowerRate),2) as MIN,
          round(max(BorrowerRate),2) as MAX ,
          round(AVG(BorrowerRate),2) as AVG,
          round(STDDEV(BorrowerRate),2) as VAR
from Loan 
where OriginationDate > '2007-12-01' and OriginationDate < '2008-01-01' group by CreditGrade;
+-------------+------+------+------+------+
| CreditGrade | MIN  | MAX  | AVG  | VAR  |
+-------------+------+------+------+------+
| A           | 0.08 | 0.23 | 0.13 | 0.03 |
| AA          | 0.06 | 0.24 | 0.10 | 0.03 |
| B           | 0.09 | 0.27 | 0.15 | 0.03 |
| C           | 0.10 | 0.35 | 0.19 | 0.05 |
| D           | 0.01 | 0.35 | 0.23 | 0.06 |
| E           | 0.08 | 0.35 | 0.26 | 0.07 |
| HR          | 0.04 | 0.35 | 0.27 | 0.08 |
+-------------+------+------+------+------+
7 rows in set (0.05 sec)
Logged
Pages: [1]   Go Up