You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Adding a missing condition on the number of available bond makers vs the number of desired counterparties before entering the algorithm that limits the maximum expected probability for large bond makers.
-Modifying which log statements are warning vs debug statements to reduce the number of lines printed on the console
-Adding an extra warning log statement that prints the number of large makers that have their weight constrained by tx_max_expected_probability
#If the number of remaining makers is sufficient to exclude some of them
255
+
ifnforders>nrem:
253
256
254
-
#If maximum expected probability target for large makers cannot be achieved using a constant value for prob
255
-
ifprob<=0ornforders-nrem+1<=1./prob:
256
-
max_exp_prob=large_makers_not_chosen_prob[0]
257
+
#If maximum expected probability target for large makers cannot be achieved using a constant value for prob
258
+
ifprob<=0ornforders-nrem+1<=1./prob:
259
+
max_exp_prob=large_makers_not_chosen_prob[0]
257
260
258
-
foriinrange(nforders-nrem+1, nforders+1):
259
-
max_exp_prob*=1-1./i
260
-
max_exp_prob=1-max_exp_prob
261
+
foriinrange(nforders-nrem+1, nforders+1):
262
+
max_exp_prob*=1-1./i
263
+
max_exp_prob=1-max_exp_prob
261
264
262
-
#If the probability target cannot be achieved at all
263
-
ifmax_exp_prob>tx_max_expected_probability:
264
-
log.warn('A large maker maximum expected probability target of '+str(tx_max_expected_probability) +' cannot be achieved. A probability of '+str(max_exp_prob) +' will be targeted instead')
#If the probability target cannot be achieved at all
266
+
ifmax_exp_prob>tx_max_expected_probability:
267
+
log.warn('A large maker maximum expected probability target of '+str(tx_max_expected_probability) +' cannot be achieved. A probability of '+str(max_exp_prob) +' will be targeted instead')
log.debug('Large maker maximum expected probability target of '+str(tx_max_expected_probability) +' achievable using an increasing draw probability due to the limited number of makers')
log.warn('Large maker maximum expected probability target of '+str(tx_max_expected_probability) +' achievable using an increasing draw probability due to the limited number of makers')
log.debug('Remaining probability of not being selected for large makers: '+str(large_makers_not_chosen_prob[0]) +' -> '+str(large_makers_not_chosen_prob[0]*(1-prob)))
log.debug('Remaining probability of not being selected for large makers: '+str(large_makers_not_chosen_prob[0]) +' -> '+str(large_makers_not_chosen_prob[0]*(1-prob)))
log.warn('Weight of counterparty '+o[0]['counterparty'] +' brought down to '+str(bvmax) +' from '+str(weights[i]))
322
-
weights[i]=bvmax
323
+
ifislargemaker[i] ==True:
324
+
log.debug('Weight of counterparty '+o[0]['counterparty'] +' brought down to '+str(bvmax) +' from '+str(weights[i]))
325
+
weights[i]=bvmax
326
+
log.warn('The weight of '+str(nlargemakers) +'/'+str(nforders) +' bond makers was reduced to reduce their maximum expected probability of being selected')
327
+
328
+
#else if nforders<=nrem
329
+
else:
330
+
log.warn('Cannot set a maximum expected probability target for bond makers as the number of bond makers is smaller or equal to the number of required counterparties')
0 commit comments