Skip to main content

Credit price tool

Project description

#Introduction This package is used to create a suitable plan of credit price for different borrowers.As historical borrowers' credit score and loan interests are given, you can train a credit price model through this package, and this model will allow you to calculate a different, recommended loan interest for any borrower only based on his or her credit score.


#Example:

import creditprice as cp
#生成数据
import numpy as np
import pandas as pd
np.random.seed(123)
score = 650 + 100 * np.random.randn(1000)
price = 0.2 + 0.1 * np.random.randn(1000)
flag = np.random.randint(2, size=1000)
flagy = np.random.binomial(1, 0.2, size=flag[flag == 1].shape[0])
data = pd.DataFrame(columns=['score', 'r', 'accept', 'flagy'])
data['score'] = score
data['r'] = price
data['accept'] = flag
data.loc[data.accept == 1, 'flagy'] = flagy
#生成模型
cl = cp.calc(ld=0.5, d = 1, rl = 0.05, rf = 0.04, score='score', interest='r', flag='accept', y = 'flagy')
#计算利率表
r_table = cl.calc_r_table(data = data)
#根据data计算单利率
r = cl.calc_r(p=0.2, data=data)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

creditprice-0.0.8.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

creditprice-0.0.8-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file creditprice-0.0.8.tar.gz.

File metadata

  • Download URL: creditprice-0.0.8.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.2

File hashes

Hashes for creditprice-0.0.8.tar.gz
Algorithm Hash digest
SHA256 3ad81f65c798b4d5f912e8d0933bbec891a3bccb301180e47e1b3b5f8d5c1b8b
MD5 90a74f1e80117c2196e7474694dab23c
BLAKE2b-256 6ef81db753aa2c42a164a15737ff47aa5fae0a6969cf68b7cbad63ad664dfdfb

See more details on using hashes here.

File details

Details for the file creditprice-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: creditprice-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.2

File hashes

Hashes for creditprice-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bf9181651c8f3b9ac985540e9127061201c637fc038fec7a590bb97e60037c12
MD5 3a570256400be588a8478decad8eef9e
BLAKE2b-256 8427c03e3e3338d4a3a7c551072f77e55a6e72b62917a36599d67d4b0e41c8ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page