Deal Library
New in version 0.43.1.
What is a Library?
Deal Library is a seperate web serivce component which offers:
user authentication
deal tag-based search
run analytics on deals hosted on the platform
User can access the Deal Library through the component from absbox.
Self host & Cloud host
There is a public Deal Library instance hosted on the cloud.
User can also host his/her own instance of the Deal Library on own server with commerial terms ( check with Email & Slack).
Tutorial
Connect to the Deal Library
from absbox import LIBRARY
library = LIBRARY("http://localhost:8082/api")
Note
User can setup his/her own library in-house or use the public one hosted on the cloud.
The public one is available at LibraryPath
from absbox import LibraryPath
Confirm the connection
library.libraryInfo
Login
library.login("username","password")
library.safeLogin("trial_1")"
Query a deal
3 types of query are supported:
query by id , return a single deal
query by tag ( return a list of deals found)
query by name , return a most recent deal with matching name
library.query(("id",1))
library.query(("tag","test"))
library.query(("name",r"MM"))
Run analytics
Run Input
User can initiate a run request sending to server. The server will find Hastructure engine by “default” or the one overrided by user.
(i,r) = library.run(<Deal Selector>
,runAssump = <Run Assumption>
,poolAssump = <Pool Assumption>
,runType = <Run Type>
,read=True
,engine="ldn-dev"
)
- <Deal Selector>
- Can be either :
(“id”,1)
(“name”,<Deal Name>)
- <Run Type>
- Can be either :
“S” -> Default,single run (Default)
“MC” -> Multiple pool assumption
“MRS” -> Multiple run assumption
“CS” -> Combo (multiple pool and run assumption)
Run Output
The run() will return a tuple of two elements:
Left value -> the run information (engine used, deal used)
Right value -> exact the same output as the one in
absboxAPI instance.
Notebook
See also