def CallEngine(): eng = LiqEngine() # TODO add LSSpread and PriorDayRateUsed from config eng.setParameters(LSSpread=1, PriorDayRateUsed=3.5) mortop = db.GqlQuery("SELECT * " "FROM User Where group = 'MO'") mo = [] for m in mortop: mo.append(m.key().name()) eng.setMortgageOriginator(mo) # TODO only set loans who are involved in the calc loans = db.GqlQuery("SELECT * " "FROM Loan") s = [] for l in loans: s.append({"loanId": l.key().name(), "mortgageOriginator": l.customer_account_key, "loanAmount": l.curr_upb}) eng.setLoans(s) users = db.GqlQuery("SELECT * " "FROM User Where group = 'Broker'") usr = [] for u in users: usr.append({"userId": u.key().name(), "fundsAvailable": u.fundsAvailable}) eng.setUsers(usr) bids = db.GqlQuery("SELECT * " "FROM Bid") s = [] for b in bids: d = {"date": b.createdAt, "bidId": b.key().name()} d["userId"] = b.user.key().name() d["bidType"] = b.bidtype if b.bidtype == "Specified": d["assetSubset"] = b.lorm d["Participation"] = b.participation d["Aggregate"] = b.aggregated if b.lorm == "Loan": d["loanId"] = b.loan.key().name() elif b.lorm == "MO": d["mortgageOriginator"] = b.mo.key().name() d["orderTiming"] = b.ordertiming d["orderType"] = b.ordertype if b.ordertype == "Competitive": d["bidRate"] = b.bidrate # if b.ordertiming == 'Auto': # d[''] = b.orderAt s.append(d) eng.setBids(s) return eng.Calc()
def calc(request): eng = LiqEngine() #TODO add LSSpread and PriorDayRateUsed from config eng.setParameters(LSSpread = 1, PriorDayRateUsed = 3.5) eng.setLoans([{'loanId' : '1', 'mortgageOriginator': 'ABC Mortgage', 'loanAmount': 318725.0}, {'loanId' : '2', 'mortgageOriginator': 'ABC Mortgage', 'loanAmount': 375685.0}, {'loanId' : '3', 'mortgageOriginator': 'Prime Lending', 'loanAmount': 479875.0}, {'loanId' : '4', 'mortgageOriginator': 'Prime Lending', 'loanAmount': 525400.0}, {'loanId' : '5', 'mortgageOriginator': 'Best Loans Inc', 'loanAmount': 515425.0}, {'loanId' : '6', 'mortgageOriginator': 'Integrity Lending', 'loanAmount': 485000.0}]) eng.setUsers([{'userId' : '*****@*****.**', 'fundsAvailable': 187500.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 500000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 185000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 1500000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 860000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 300000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 250000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 74000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 285000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 532000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 292000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 752000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 418000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 47000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 283000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 598000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 639000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 274000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 629000.0}, {'userId' : '*****@*****.**', 'fundsAvailable': 562000.0}]) eng.setBids([{'date' : '15:00:00', 'bidId' : '1104134', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 3.000, 'orderTiming' : 'Auto'}, {'date' : '15:00:00', 'bidId' : '1104143', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 20, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 2.875, 'orderTiming' : 'Auto'}, {'date' : '15:00:00', 'bidId' : '1104154', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 2.000, 'orderTiming' : 'Auto'}, {'date' : '15:00:00', 'bidId' : '1104152', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 30, 'assetSubset' : 'Loan', 'loanId' : '3', 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Auto'}, {'date' : '17:06:12', 'bidId' : '1104136', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 2.750, 'orderTiming' : 'Day Trade'}, {'date' : '18:32:36', 'bidId' : '1104138', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '5', 'orderType' : 'Noncompetitive', 'bidRate' : 2.625, 'orderTiming' : 'Day Trade'}, {'date' : '19:15:48', 'bidId' : '1104139', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 2.250, 'orderTiming' : 'Day Trade'}, {'date' : '19:59:00', 'bidId' : '1104140', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 20, 'assetSubset' : 'MO', 'mortgageOriginator' : 'ABC Mortgage', 'orderType' : 'Noncompetitive', 'bidRate' : 2.875, 'orderTiming' : 'Day Trade'}, {'date' : '20:42:12', 'bidId' : '1104141', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 30, 'orderType' : 'Noncompetitive', 'bidRate' : 3.000, 'orderTiming' : 'Day Trade'}, {'date' : '21:39:48', 'bidId' : '1104159', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 30, 'assetSubset' : 'Loan', 'loanId' : '3', 'orderType' : 'Noncompetitive', 'bidRate' : 3.125, 'orderTiming' : 'Day Trade'}, {'date' : '23:06:12', 'bidId' : '1104161', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 40, 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Day Trade'}, {'date' : '23:35:00', 'bidId' : '1104145', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 30, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 2.375, 'orderTiming' : 'Day Trade'}, {'date' : '2:23:00', 'bidId' : '1104133', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 3.500, 'orderTiming' : 'Day Trade'}, {'date' : '2:27:48', 'bidId' : '1104149', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 3.375, 'orderTiming' : 'Day Trade'}, {'date' : '3:54:12', 'bidId' : '1104151', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 2.125, 'orderTiming' : 'Day Trade'}, {'date' : '4:37:24', 'bidId' : '1104131', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 30, 'assetSubset' : 'MO', 'mortgageOriginator' : 'Prime Lending', 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Day Trade'}, {'date' : '6:47:00', 'bidId' : '1104155', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 2.875, 'orderTiming' : 'Day Trade'}, {'date' : '7:30:12', 'bidId' : '1104156', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Day Trade'}, {'date' : '8:13:24', 'bidId' : '1104157', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 2.000, 'orderTiming' : 'Day Trade'}, {'date' : '8:56:36', 'bidId' : '1104158', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '3', 'orderType' : 'Noncompetitive', 'bidRate' : 2.125, 'orderTiming' : 'Day Trade'}]) try: context = eng.Calc() Context = UserContext(request) Context['loans'] = [] for c in context['loans'].iteritems(): Context['loans'].append(c[0]) Context['bids'] = [] for b in context['bids'].iteritems(): c = [{'bid': b[0]}] for l in Context['loans']: if l in b[1]['allocatedAmounts']: c.append(({"key": l, "val": '%.2f' % b[1]['allocatedAmounts'][l]})) else: c.append(({"key": l, "val": 0})) Context['bids'].append(c) return render_to_response("engine/results.html", Context, context_instance=RequestContext(request)) except: return render_to_response("500.html", context_instance=RequestContext(request))
eng.setBids([{'date' : '15:00:00', 'bidId' : '1104134', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 3.000, 'orderTiming' : 'Auto'}, {'date' : '15:00:00', 'bidId' : '1104143', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 20, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 2.875, 'orderTiming' : 'Auto'}, {'date' : '15:00:00', 'bidId' : '1104154', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 2.000, 'orderTiming' : 'Auto'}, {'date' : '15:00:00', 'bidId' : '1104152', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 30, 'assetSubset' : 'Loan', 'loanId' : '3', 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Auto'}, {'date' : '17:06:12', 'bidId' : '1104136', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 2.750, 'orderTiming' : 'Day Trade'}, {'date' : '18:32:36', 'bidId' : '1104138', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '5', 'orderType' : 'Noncompetitive', 'bidRate' : 2.625, 'orderTiming' : 'Day Trade'}, {'date' : '19:15:48', 'bidId' : '1104139', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 2.250, 'orderTiming' : 'Day Trade'}, {'date' : '19:59:00', 'bidId' : '1104140', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 20, 'assetSubset' : 'MO', 'mortgageOriginator' : 'ABC Mortgage', 'orderType' : 'Noncompetitive', 'bidRate' : 2.875, 'orderTiming' : 'Day Trade'}, {'date' : '20:42:12', 'bidId' : '1104141', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 30, 'orderType' : 'Noncompetitive', 'bidRate' : 3.000, 'orderTiming' : 'Day Trade'}, {'date' : '21:39:48', 'bidId' : '1104159', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 30, 'assetSubset' : 'Loan', 'loanId' : '3', 'orderType' : 'Noncompetitive', 'bidRate' : 3.125, 'orderTiming' : 'Day Trade'}, {'date' : '23:06:12', 'bidId' : '1104161', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 40, 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Day Trade'}, {'date' : '23:35:00', 'bidId' : '1104145', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 30, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 2.375, 'orderTiming' : 'Day Trade'}, {'date' : '2:23:00', 'bidId' : '1104133', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 3.500, 'orderTiming' : 'Day Trade'}, {'date' : '2:27:48', 'bidId' : '1104149', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 3.375, 'orderTiming' : 'Day Trade'}, {'date' : '3:54:12', 'bidId' : '1104151', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 2.125, 'orderTiming' : 'Day Trade'}, {'date' : '4:37:24', 'bidId' : '1104131', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 30, 'assetSubset' : 'MO', 'mortgageOriginator' : 'Prime Lending', 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Day Trade'}, {'date' : '6:47:00', 'bidId' : '1104155', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 500000.0, 'Participation' : 20, 'orderType' : 'Noncompetitive', 'bidRate' : 2.875, 'orderTiming' : 'Day Trade'}, {'date' : '7:30:12', 'bidId' : '1104156', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 500000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '1', 'orderType' : 'Noncompetitive', 'bidRate' : 2.500, 'orderTiming' : 'Day Trade'}, {'date' : '8:13:24', 'bidId' : '1104157', 'userId' : '*****@*****.**', 'bidType' : 'General', 'Aggregate' : 100000.0, 'Participation' : 10, 'orderType' : 'Noncompetitive', 'bidRate' : 2.000, 'orderTiming' : 'Day Trade'}, {'date' : '8:56:36', 'bidId' : '1104158', 'userId' : '*****@*****.**', 'bidType' : 'Specified', 'Aggregate' : 100000.0, 'Participation' : 10, 'assetSubset' : 'Loan', 'loanId' : '3', 'orderType' : 'Noncompetitive', 'bidRate' : 2.125, 'orderTiming' : 'Day Trade'}])
eng.setBids([{'bidType': u'Specified', 'orderType': u'Noncompetitive', 'loanId': u'201149669', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'11:06:12 PM 1104161', 'date': datetime.datetime(1900, 1, 1, 23, 6, 12), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'Specified', 'bidRate': 1.5, 'orderType': u'Competitive', 'loanId': u'201148329', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'11:35:00 PM 1104145', 'date': datetime.datetime(1900, 1, 1, 23, 35), 'assetSubset': u'Loan', 'Participation': 10.0}, {'bidType': u'Specified', 'bidRate': 4.0, 'orderType': u'Competitive', 'loanId': u'201149669', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'2:23:00 AM 1104133', 'date': datetime.datetime(1900, 1, 1, 2, 23), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'Specified', 'orderType': u'Noncompetitive', 'loanId': u'201148440', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'2:27:48 AM 1104149', 'date': datetime.datetime(1900, 1, 1, 2, 27, 48), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'General', 'orderType': u'Noncompetitive', 'userId': u'*****@*****.**', 'Aggregate': 15000000.0, 'bidId': u'3:00:00 PM 1104134', 'date': datetime.datetime(1900, 1, 1, 15, 0), 'orderTiming': u'Auto', 'Participation': 10.0}, {'bidType': u'Specified', 'orderType': u'Noncompetitive', 'userId': u'*****@*****.**', 'orderTiming': u'Auto', 'Aggregate': None, 'mortgageOriginator': u'ABCD', 'bidId': u'3:00:00 PM 1104143', 'date': datetime.datetime(1900, 1, 1, 15, 0), 'assetSubset': u'MO', 'Participation': 20.0}, {'bidType': u'Specified', 'bidRate': 3.0, 'orderType': u'Competitive', 'userId': u'*****@*****.**', 'orderTiming': u'Auto', 'Aggregate': None, 'mortgageOriginator': u'BCDE', 'bidId': u'3:00:00 PM 1104152', 'date': datetime.datetime(1900, 1, 1, 15, 0), 'assetSubset': u'MO', 'Participation': 20.0}, {'bidType': u'General', 'bidRate': 3.0, 'orderType': u'Competitive', 'userId': u'*****@*****.**', 'Aggregate': 20000000.0, 'bidId': u'3:00:00 PM 1104154', 'date': datetime.datetime(1900, 1, 1, 15, 0), 'orderTiming': u'Auto', 'Participation': 20.0}, {'bidType': u'Specified', 'orderType': u'Noncompetitive', 'loanId': u'201148329', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'3:54:12 AM 1104151', 'date': datetime.datetime(1900, 1, 1, 3, 54, 12), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'General', 'orderType': u'Noncompetitive', 'userId': u'*****@*****.**', 'Aggregate': 1000000.0, 'bidId': u'4:37:24 AM 1104131', 'date': datetime.datetime(1900, 1, 1, 4, 37, 24), 'orderTiming': u'Day Trade', 'Participation': 50.0}, {'bidType': u'Specified', 'bidRate': 6.0, 'orderType': u'Competitive', 'loanId': u'201149669', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'5:06:12 PM 1104136', 'date': datetime.datetime(1900, 1, 1, 17, 6, 12), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'General', 'bidRate': 2.125, 'orderType': u'Competitive', 'userId': u'*****@*****.**', 'Aggregate': 1000000.0, 'bidId': u'6:32:36 PM 1104138', 'date': datetime.datetime(1900, 1, 1, 18, 32, 36), 'orderTiming': u'Day Trade', 'Participation': 50.0}, {'bidType': u'Specified', 'bidRate': 2.125, 'orderType': u'Competitive', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'mortgageOriginator': u'EFGH', 'bidId': u'6:47:00 AM 1104155', 'date': datetime.datetime(1900, 1, 1, 6, 47), 'assetSubset': u'MO', 'Participation': 20.0}, {'bidType': u'General', 'bidRate': 2.25, 'orderType': u'Competitive', 'userId': u'*****@*****.**', 'Aggregate': 500000.0, 'bidId': u'7:15:48 PM 1104139', 'date': datetime.datetime(1900, 1, 1, 19, 15, 48), 'orderTiming': u'Day Trade', 'Participation': 30.0}, {'bidType': u'Specified', 'orderType': u'Noncompetitive', 'loanId': u'201148009', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'7:30:12 AM 1104156', 'date': datetime.datetime(1900, 1, 1, 7, 30, 12), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'Specified', 'bidRate': 2.5, 'orderType': u'Competitive', 'loanId': u'201148440', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'7:59:00 PM 1104140', 'date': datetime.datetime(1900, 1, 1, 19, 59), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'General', 'orderType': u'Noncompetitive', 'userId': u'*****@*****.**', 'Aggregate': 1000000.0, 'bidId': u'8:13:24 AM 1104157', 'date': datetime.datetime(1900, 1, 1, 8, 13, 24), 'orderTiming': u'Day Trade', 'Participation': 30.0}, {'bidType': u'General', 'bidRate': 2.5, 'orderType': u'Competitive', 'userId': u'*****@*****.**', 'Aggregate': 500000.0, 'bidId': u'8:42:12 PM 1104141', 'date': datetime.datetime(1900, 1, 1, 20, 42, 12), 'orderTiming': u'Day Trade', 'Participation': 20.0}, {'bidType': u'Specified', 'bidRate': 2.25, 'orderType': u'Competitive', 'loanId': u'201148329', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'8:56:36 AM 1104158', 'date': datetime.datetime(1900, 1, 1, 8, 56, 36), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'Specified', 'orderType': u'Noncompetitive', 'loanId': u'201148329', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'9:39:48 PM 1104159', 'date': datetime.datetime(1900, 1, 1, 21, 39, 48), 'assetSubset': u'Loan', 'Participation': 20.0}, {'bidType': u'Specified', 'bidRate': 7.0, 'orderType': u'Competitive', 'loanId': u'201145114', 'userId': u'*****@*****.**', 'orderTiming': u'Day Trade', 'Aggregate': None, 'bidId': u'[email protected] 2012-06-06 21:15:55.614542', 'date': datetime.datetime(2012, 6, 6, 21, 15, 55, 614542), 'assetSubset': u'Loan', 'Participation': 5.0} ])