Fumagalli_Motta_Tarantino_2020.Models.Types
1from dataclasses import dataclass 2from enum import Enum 3 4 5class MergerPolicies(Enum): 6 """ 7 Defines the available merger policies in the models. 8 """ 9 10 Strict = "Strict" 11 """ 12 The AA authorises only takeovers that, at the moment in which they are reviewed, are expected to increase total 13 welfare. 14 """ 15 Intermediate_late_takeover_prohibited = "Intermediate (late takeover prohibited)" 16 """The AA blocks late takeovers, but is more lenient with early takeovers.""" 17 Intermediate_late_takeover_allowed = "Intermediate (late takeover allowed)" 18 """The AA authorises late takeovers, but is stricter with early takeovers.""" 19 Laissez_faire = "Laissez-faire" 20 """The intervention threshold of the AA is so high that any acquisition would be allowed.""" 21 22 def abbreviation(self) -> str: 23 """ 24 Generates a string containing the abbreviation of the current merger policy. 25 26 Returns 27 ------- 28 str 29 Abbreviation of the current merger policy. 30 """ 31 if self is MergerPolicies.Intermediate_late_takeover_prohibited: 32 return "$I^P$" 33 if self is MergerPolicies.Intermediate_late_takeover_allowed: 34 return "$I^A$" 35 return f"${self.value[0]}$" 36 37 def __str__(self) -> str: 38 """ 39 Returns the string representation of the current merger policy. 40 41 Returns 42 ------- 43 str 44 String representation of the current merger policy. 45 """ 46 return self.value 47 48 @staticmethod 49 def legend() -> str: 50 """ 51 Generates a string containing the legend of the possible merger policies. 52 53 Returns 54 ------- 55 str 56 Containing the legend for the merger policies. 57 """ 58 return ( 59 f"{MergerPolicies.Strict.abbreviation()}: Strict\n" 60 f"{MergerPolicies.Intermediate_late_takeover_prohibited.abbreviation()}:" 61 f" Intermediate (late takeover prohibited)\n" 62 f"{MergerPolicies.Intermediate_late_takeover_allowed.abbreviation()}:" 63 f" Intermediate (late takeover allowed)\n" 64 f"{MergerPolicies.Laissez_faire.abbreviation()}: Laissez-faire" 65 ) 66 67 68class Takeover(Enum): 69 """ 70 Defines the available options for a takeover of the start-up by the incumbent. 71 """ 72 73 No = "No bid" 74 """The incumbent does not bid for the start-up.""" 75 Separating = "Separating bid" 76 """The incumbent offers a low takeover price targeting only the credit-rationed start-ups.""" 77 Pooling = "Pooling bid" 78 """ 79 The incumbent offers a high takeover price such that a start-up would always accept, irrespective of the amount of 80 its own assets. 81 """ 82 83 def abbreviation(self) -> str: 84 """ 85 Generates a string containing the abbreviation of the current takeover option. 86 87 Returns 88 ------- 89 str 90 Abbreviation of the current takeover option. 91 """ 92 return f"${self.value[0]}$" 93 94 def __str__(self) -> str: 95 """ 96 Returns the string representation of the current takeover option. 97 98 Returns 99 ------- 100 str 101 String representation of the current takeover option. 102 """ 103 104 return self.value 105 106 @staticmethod 107 def legend() -> str: 108 """ 109 Generates a string containing the legend of the possible takeover options. 110 111 Returns 112 ------- 113 str 114 Containing the legend for the takeover options. 115 """ 116 return ( 117 f"{Takeover.No.abbreviation()}: No bid by the incumbent\n" 118 f"{Takeover.Separating.abbreviation()}: Separating bid by the incumbent\n" 119 f"{Takeover.Pooling.abbreviation()}: Pooling bid by the incumbent" 120 ) 121 122 123@dataclass(frozen=True) 124class ThresholdItem: 125 """ 126 Threshold item containing the name (string representation) and the value (threshold express in float value). 127 """ 128 129 name: str 130 value: float 131 include: bool = False 132 """Marks this ThresholdItem with high priority.""" 133 134 def __eq__(self, other): 135 return self.value == other.value 136 137 def __lt__(self, other): 138 return self.value < other.value 139 140 141@dataclass(frozen=True) 142class Outcome: 143 """ 144 Contains the bare-bones information about the outcome of a Fumagalli_Motta_Tarantino_2020.Models.Base.MergerPolicy. 145 """ 146 147 early_bidding_type: Takeover 148 late_bidding_type: Takeover 149 development_attempt: bool 150 development_outcome: bool 151 early_takeover: bool 152 late_takeover: bool 153 154 155@dataclass(frozen=True) 156class Summary(Outcome): 157 """ 158 Summary of Fumagalli_Motta_Tarantino_2020.Models.Base.MergerPolicy. 159 """ 160 161 set_policy: MergerPolicies 162 credit_rationed: bool 163 164 165@dataclass(frozen=True) 166class OptimalMergerPolicySummary(Summary): 167 """ 168 Summary of Fumagalli_Motta_Tarantino_2020.Models.Base.OptimalMergerPolicy. 169 """ 170 171 optimal_policy: MergerPolicies 172 173 174class PossibleOutcomes(Enum): 175 """ 176 Contains the outcomes in the models. 177 """ 178 179 def __init__( 180 self, 181 early_bidding_type: Takeover, 182 early_takeover: bool, 183 development_attempt: bool, 184 development_outcome: bool, 185 late_bidding_type: Takeover, 186 late_takeover: bool, 187 ): 188 self.outcome = Outcome( 189 early_bidding_type=early_bidding_type, 190 early_takeover=early_takeover, 191 development_attempt=development_attempt, 192 development_outcome=development_outcome, 193 late_bidding_type=late_bidding_type, 194 late_takeover=late_takeover, 195 ) 196 197 NoTakeoversSuccessfulDevelopment = ( 198 Takeover.No, 199 False, 200 True, 201 True, 202 Takeover.No, 203 False, 204 ) 205 """Neither an early or late takeover occurs and the development is successful.""" 206 207 NoTakeoversFailedDevelopment = (Takeover.No, False, True, False, Takeover.No, False) 208 """Neither an early or late takeover occurs and the development is unsuccessful.""" 209 210 NoTakeoversDevelopmentNotAttempted = ( 211 Takeover.No, 212 False, 213 False, 214 False, 215 Takeover.No, 216 False, 217 ) 218 """Neither an early or late takeover occurs and the development is not attempted.""" 219 220 RejectedEarlySeparatingSuccessfulDevelopment = ( 221 Takeover.Separating, 222 False, 223 True, 224 True, 225 Takeover.No, 226 False, 227 ) 228 """An early separating bid is rejected by the start-up and the development is successful.""" 229 230 RejectedEarlySeparatingUnsuccessfulDevelopment = ( 231 Takeover.Separating, 232 False, 233 True, 234 False, 235 Takeover.No, 236 False, 237 ) 238 """An early separating bid is rejected by the start-up and the development is unsuccessful.""" 239 240 EarlySeparatingSuccessfulDevelopment = ( 241 Takeover.Separating, 242 True, 243 True, 244 True, 245 Takeover.No, 246 False, 247 ) 248 """An early separating bid is accepted by the start-up and the development is successful.""" 249 250 EarlySeparatingUnsuccessfulDevelopment = ( 251 Takeover.Separating, 252 True, 253 True, 254 False, 255 Takeover.No, 256 False, 257 ) 258 """An early separating bid is accepted by the start-up and the development is unsuccessful.""" 259 260 EarlySeparatingDevelopmentNotAttempted = ( 261 Takeover.Separating, 262 True, 263 False, 264 False, 265 Takeover.No, 266 False, 267 ) 268 """An early separating bid is accepted by the start-up and the development is not attempted.""" 269 270 EarlyPoolingSuccessfulDevelopment = ( 271 Takeover.Pooling, 272 True, 273 True, 274 True, 275 Takeover.No, 276 False, 277 ) 278 """An early pooling bid is accepted by the start-up and the development is successful.""" 279 280 EarlyPoolingUnsuccessfulDevelopment = ( 281 Takeover.Pooling, 282 True, 283 True, 284 False, 285 Takeover.No, 286 False, 287 ) 288 """An early pooling bid is accepted by the start-up and the development is unsuccessful.""" 289 290 EarlyPoolingDevelopmentNotAttempted = ( 291 Takeover.Pooling, 292 True, 293 False, 294 False, 295 Takeover.No, 296 False, 297 ) 298 """An early pooling bid is accepted by the start-up and the development is not attempted.""" 299 300 LatePooling = ( 301 Takeover.No, 302 False, 303 True, 304 True, 305 Takeover.Pooling, 306 True, 307 ) 308 """A late pooling bid is accepted by the start-up after a successful development.""" 309 310 LatePoolingRejectedEarlySeparating = ( 311 Takeover.Separating, 312 False, 313 True, 314 True, 315 Takeover.Pooling, 316 True, 317 ) 318 """ 319 An early separating bid is rejected by the start-up and the development is successful with subsequent late takeover. 320 """
6class MergerPolicies(Enum): 7 """ 8 Defines the available merger policies in the models. 9 """ 10 11 Strict = "Strict" 12 """ 13 The AA authorises only takeovers that, at the moment in which they are reviewed, are expected to increase total 14 welfare. 15 """ 16 Intermediate_late_takeover_prohibited = "Intermediate (late takeover prohibited)" 17 """The AA blocks late takeovers, but is more lenient with early takeovers.""" 18 Intermediate_late_takeover_allowed = "Intermediate (late takeover allowed)" 19 """The AA authorises late takeovers, but is stricter with early takeovers.""" 20 Laissez_faire = "Laissez-faire" 21 """The intervention threshold of the AA is so high that any acquisition would be allowed.""" 22 23 def abbreviation(self) -> str: 24 """ 25 Generates a string containing the abbreviation of the current merger policy. 26 27 Returns 28 ------- 29 str 30 Abbreviation of the current merger policy. 31 """ 32 if self is MergerPolicies.Intermediate_late_takeover_prohibited: 33 return "$I^P$" 34 if self is MergerPolicies.Intermediate_late_takeover_allowed: 35 return "$I^A$" 36 return f"${self.value[0]}$" 37 38 def __str__(self) -> str: 39 """ 40 Returns the string representation of the current merger policy. 41 42 Returns 43 ------- 44 str 45 String representation of the current merger policy. 46 """ 47 return self.value 48 49 @staticmethod 50 def legend() -> str: 51 """ 52 Generates a string containing the legend of the possible merger policies. 53 54 Returns 55 ------- 56 str 57 Containing the legend for the merger policies. 58 """ 59 return ( 60 f"{MergerPolicies.Strict.abbreviation()}: Strict\n" 61 f"{MergerPolicies.Intermediate_late_takeover_prohibited.abbreviation()}:" 62 f" Intermediate (late takeover prohibited)\n" 63 f"{MergerPolicies.Intermediate_late_takeover_allowed.abbreviation()}:" 64 f" Intermediate (late takeover allowed)\n" 65 f"{MergerPolicies.Laissez_faire.abbreviation()}: Laissez-faire" 66 )
Defines the available merger policies in the models.
The AA authorises only takeovers that, at the moment in which they are reviewed, are expected to increase total welfare.
The AA blocks late takeovers, but is more lenient with early takeovers.
The AA authorises late takeovers, but is stricter with early takeovers.
The intervention threshold of the AA is so high that any acquisition would be allowed.
23 def abbreviation(self) -> str: 24 """ 25 Generates a string containing the abbreviation of the current merger policy. 26 27 Returns 28 ------- 29 str 30 Abbreviation of the current merger policy. 31 """ 32 if self is MergerPolicies.Intermediate_late_takeover_prohibited: 33 return "$I^P$" 34 if self is MergerPolicies.Intermediate_late_takeover_allowed: 35 return "$I^A$" 36 return f"${self.value[0]}$"
Generates a string containing the abbreviation of the current merger policy.
Returns
- str: Abbreviation of the current merger policy.
49 @staticmethod 50 def legend() -> str: 51 """ 52 Generates a string containing the legend of the possible merger policies. 53 54 Returns 55 ------- 56 str 57 Containing the legend for the merger policies. 58 """ 59 return ( 60 f"{MergerPolicies.Strict.abbreviation()}: Strict\n" 61 f"{MergerPolicies.Intermediate_late_takeover_prohibited.abbreviation()}:" 62 f" Intermediate (late takeover prohibited)\n" 63 f"{MergerPolicies.Intermediate_late_takeover_allowed.abbreviation()}:" 64 f" Intermediate (late takeover allowed)\n" 65 f"{MergerPolicies.Laissez_faire.abbreviation()}: Laissez-faire" 66 )
Generates a string containing the legend of the possible merger policies.
Returns
- str: Containing the legend for the merger policies.
Inherited Members
- enum.Enum
- name
- value
69class Takeover(Enum): 70 """ 71 Defines the available options for a takeover of the start-up by the incumbent. 72 """ 73 74 No = "No bid" 75 """The incumbent does not bid for the start-up.""" 76 Separating = "Separating bid" 77 """The incumbent offers a low takeover price targeting only the credit-rationed start-ups.""" 78 Pooling = "Pooling bid" 79 """ 80 The incumbent offers a high takeover price such that a start-up would always accept, irrespective of the amount of 81 its own assets. 82 """ 83 84 def abbreviation(self) -> str: 85 """ 86 Generates a string containing the abbreviation of the current takeover option. 87 88 Returns 89 ------- 90 str 91 Abbreviation of the current takeover option. 92 """ 93 return f"${self.value[0]}$" 94 95 def __str__(self) -> str: 96 """ 97 Returns the string representation of the current takeover option. 98 99 Returns 100 ------- 101 str 102 String representation of the current takeover option. 103 """ 104 105 return self.value 106 107 @staticmethod 108 def legend() -> str: 109 """ 110 Generates a string containing the legend of the possible takeover options. 111 112 Returns 113 ------- 114 str 115 Containing the legend for the takeover options. 116 """ 117 return ( 118 f"{Takeover.No.abbreviation()}: No bid by the incumbent\n" 119 f"{Takeover.Separating.abbreviation()}: Separating bid by the incumbent\n" 120 f"{Takeover.Pooling.abbreviation()}: Pooling bid by the incumbent" 121 )
Defines the available options for a takeover of the start-up by the incumbent.
The incumbent offers a low takeover price targeting only the credit-rationed start-ups.
The incumbent offers a high takeover price such that a start-up would always accept, irrespective of the amount of its own assets.
84 def abbreviation(self) -> str: 85 """ 86 Generates a string containing the abbreviation of the current takeover option. 87 88 Returns 89 ------- 90 str 91 Abbreviation of the current takeover option. 92 """ 93 return f"${self.value[0]}$"
Generates a string containing the abbreviation of the current takeover option.
Returns
- str: Abbreviation of the current takeover option.
107 @staticmethod 108 def legend() -> str: 109 """ 110 Generates a string containing the legend of the possible takeover options. 111 112 Returns 113 ------- 114 str 115 Containing the legend for the takeover options. 116 """ 117 return ( 118 f"{Takeover.No.abbreviation()}: No bid by the incumbent\n" 119 f"{Takeover.Separating.abbreviation()}: Separating bid by the incumbent\n" 120 f"{Takeover.Pooling.abbreviation()}: Pooling bid by the incumbent" 121 )
Generates a string containing the legend of the possible takeover options.
Returns
- str: Containing the legend for the takeover options.
Inherited Members
- enum.Enum
- name
- value
124@dataclass(frozen=True) 125class ThresholdItem: 126 """ 127 Threshold item containing the name (string representation) and the value (threshold express in float value). 128 """ 129 130 name: str 131 value: float 132 include: bool = False 133 """Marks this ThresholdItem with high priority.""" 134 135 def __eq__(self, other): 136 return self.value == other.value 137 138 def __lt__(self, other): 139 return self.value < other.value
Threshold item containing the name (string representation) and the value (threshold express in float value).
142@dataclass(frozen=True) 143class Outcome: 144 """ 145 Contains the bare-bones information about the outcome of a Fumagalli_Motta_Tarantino_2020.Models.Base.MergerPolicy. 146 """ 147 148 early_bidding_type: Takeover 149 late_bidding_type: Takeover 150 development_attempt: bool 151 development_outcome: bool 152 early_takeover: bool 153 late_takeover: bool
Contains the bare-bones information about the outcome of a Fumagalli_Motta_Tarantino_2020.Models.Base.MergerPolicy.
156@dataclass(frozen=True) 157class Summary(Outcome): 158 """ 159 Summary of Fumagalli_Motta_Tarantino_2020.Models.Base.MergerPolicy. 160 """ 161 162 set_policy: MergerPolicies 163 credit_rationed: bool
166@dataclass(frozen=True) 167class OptimalMergerPolicySummary(Summary): 168 """ 169 Summary of Fumagalli_Motta_Tarantino_2020.Models.Base.OptimalMergerPolicy. 170 """ 171 172 optimal_policy: MergerPolicies
175class PossibleOutcomes(Enum): 176 """ 177 Contains the outcomes in the models. 178 """ 179 180 def __init__( 181 self, 182 early_bidding_type: Takeover, 183 early_takeover: bool, 184 development_attempt: bool, 185 development_outcome: bool, 186 late_bidding_type: Takeover, 187 late_takeover: bool, 188 ): 189 self.outcome = Outcome( 190 early_bidding_type=early_bidding_type, 191 early_takeover=early_takeover, 192 development_attempt=development_attempt, 193 development_outcome=development_outcome, 194 late_bidding_type=late_bidding_type, 195 late_takeover=late_takeover, 196 ) 197 198 NoTakeoversSuccessfulDevelopment = ( 199 Takeover.No, 200 False, 201 True, 202 True, 203 Takeover.No, 204 False, 205 ) 206 """Neither an early or late takeover occurs and the development is successful.""" 207 208 NoTakeoversFailedDevelopment = (Takeover.No, False, True, False, Takeover.No, False) 209 """Neither an early or late takeover occurs and the development is unsuccessful.""" 210 211 NoTakeoversDevelopmentNotAttempted = ( 212 Takeover.No, 213 False, 214 False, 215 False, 216 Takeover.No, 217 False, 218 ) 219 """Neither an early or late takeover occurs and the development is not attempted.""" 220 221 RejectedEarlySeparatingSuccessfulDevelopment = ( 222 Takeover.Separating, 223 False, 224 True, 225 True, 226 Takeover.No, 227 False, 228 ) 229 """An early separating bid is rejected by the start-up and the development is successful.""" 230 231 RejectedEarlySeparatingUnsuccessfulDevelopment = ( 232 Takeover.Separating, 233 False, 234 True, 235 False, 236 Takeover.No, 237 False, 238 ) 239 """An early separating bid is rejected by the start-up and the development is unsuccessful.""" 240 241 EarlySeparatingSuccessfulDevelopment = ( 242 Takeover.Separating, 243 True, 244 True, 245 True, 246 Takeover.No, 247 False, 248 ) 249 """An early separating bid is accepted by the start-up and the development is successful.""" 250 251 EarlySeparatingUnsuccessfulDevelopment = ( 252 Takeover.Separating, 253 True, 254 True, 255 False, 256 Takeover.No, 257 False, 258 ) 259 """An early separating bid is accepted by the start-up and the development is unsuccessful.""" 260 261 EarlySeparatingDevelopmentNotAttempted = ( 262 Takeover.Separating, 263 True, 264 False, 265 False, 266 Takeover.No, 267 False, 268 ) 269 """An early separating bid is accepted by the start-up and the development is not attempted.""" 270 271 EarlyPoolingSuccessfulDevelopment = ( 272 Takeover.Pooling, 273 True, 274 True, 275 True, 276 Takeover.No, 277 False, 278 ) 279 """An early pooling bid is accepted by the start-up and the development is successful.""" 280 281 EarlyPoolingUnsuccessfulDevelopment = ( 282 Takeover.Pooling, 283 True, 284 True, 285 False, 286 Takeover.No, 287 False, 288 ) 289 """An early pooling bid is accepted by the start-up and the development is unsuccessful.""" 290 291 EarlyPoolingDevelopmentNotAttempted = ( 292 Takeover.Pooling, 293 True, 294 False, 295 False, 296 Takeover.No, 297 False, 298 ) 299 """An early pooling bid is accepted by the start-up and the development is not attempted.""" 300 301 LatePooling = ( 302 Takeover.No, 303 False, 304 True, 305 True, 306 Takeover.Pooling, 307 True, 308 ) 309 """A late pooling bid is accepted by the start-up after a successful development.""" 310 311 LatePoolingRejectedEarlySeparating = ( 312 Takeover.Separating, 313 False, 314 True, 315 True, 316 Takeover.Pooling, 317 True, 318 ) 319 """ 320 An early separating bid is rejected by the start-up and the development is successful with subsequent late takeover. 321 """
Contains the outcomes in the models.
Neither an early or late takeover occurs and the development is successful.
Neither an early or late takeover occurs and the development is unsuccessful.
Neither an early or late takeover occurs and the development is not attempted.
An early separating bid is rejected by the start-up and the development is successful.
An early separating bid is rejected by the start-up and the development is unsuccessful.
An early separating bid is accepted by the start-up and the development is successful.
An early separating bid is accepted by the start-up and the development is unsuccessful.
An early separating bid is accepted by the start-up and the development is not attempted.
An early pooling bid is accepted by the start-up and the development is successful.
An early pooling bid is accepted by the start-up and the development is unsuccessful.
An early pooling bid is accepted by the start-up and the development is not attempted.
A late pooling bid is accepted by the start-up after a successful development.
An early separating bid is rejected by the start-up and the development is successful with subsequent late takeover.
Inherited Members
- enum.Enum
- name
- value