samlothen / QRALib

Quantitative Risk Analysis in Cybersecurity Library (QRALib)
GNU General Public License v3.0
13 stars 5 forks source link

Distributions #2

Open Timberwolfz opened 1 year ago

Timberwolfz commented 1 year ago

Great code. Do we have to run for all distributions/simulations or can we run just one? For instance, can I just run lognormal/standard monte carlo? Not sure if you must run for all or not.

samlothen commented 1 year ago

Hi! Thank you.

No, it only runs the one being used. If all you risks uses lognormal distribution then only lognormal will be used for the distributions.

Regarding the type of Monte Carlo, you choose the one you want to use.

Have a look at the examples (https://github.com/samlothen/QRALib/blob/master/examples/qralib_example.py). There I import standrad montecarlo as smc and use it to run the simulation.

Hope that clarifies it.

Timberwolfz commented 1 year ago

Hi, another question. The simulation is set for 100,000 iterations. Is there a reason for that? Is that standard or could that be changed to 10,000 and not be any different? I think the point is to simulate a year when the program runs right?

On Oct 30, 2022, at 5:33 AM, samlothen @.***> wrote:

Hi! Thank you.

No, it only runs the one being used. If all you risks uses lognormal distribution then only lognormal will be used for the distributions.

Regarding the type of Monte Carlo, you choose the one you want to use.

Have a look at the examples (https://github.com/samlothen/QRALib/blob/master/examples/qralib_example.py https://github.com/samlothen/QRALib/blob/master/examples/qralib_example.py). There I import standrad montecarlo as smc and use it to run the simulation.

Hope that clarifies it.

— Reply to this email directly, view it on GitHub https://github.com/samlothen/QRALib/issues/2#issuecomment-1296186583, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BGHSTVOKBQQFKDWYBANO3WFYXFPANCNFSM6AAAAAARODDKRM. You are receiving this because you authored the thread.

samlothen commented 1 year ago

Good question.

You can use as many simulations as you want. It depends on how certain you want that the simulation has covered all different cases. To reach a reasonably accurate result I would recommend at least 1000 for SMC or 150 for RMC. If you want a higher accuracy I would suggest running it with RMC and at least 1200 simulations. (SMC = Standard Monte Carlo, RMC = Randomised Quasi Monte Carlo).

The reason for the example having 100,000 simulations is that I used that for accuracy testing of the different methodologies. If you want to dive deeper into the subject I recommend reading the my thesis, which explored just that: http://uu.diva-portal.org/smash/get/diva2:1532891/FULLTEXT01.pdf

Timberwolfz commented 1 year ago

Thanks! Adding Deepak who is helping build this out to see if he has other questions.

On Nov 9, 2022, at 1:33 AM, samlothen @.***> wrote:

Good question.

You can use as many simulations as you want. It depends on how certain you want that the simulation has covered all different cases. To reach a reasonably accurate result I would recommend at least 1000 for SMC or 150 for RMC. If you want a higher accuracy I would suggest running it with RMC and at least 1200 simulations. (SMC = Standard Monte Carlo, RMC = Randomised Quasi Monte Carlo).

The reason for the example having 100,000 simulations is that I used that for accuracy testing of the different methodologies. If you want to dive deeper into the subject I recommend reading the my thesis, which explored just that: http://uu.diva-portal.org/smash/get/diva2:1532891/FULLTEXT01.pdf

— Reply to this email directly, view it on GitHub https://github.com/samlothen/QRALib/issues/2#issuecomment-1308277413, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BGHSV4GDKFKBDNL5HHPZLWHNATJANCNFSM6AAAAAARODDKRM. You are receiving this because you authored the thread.

Timberwolfz commented 1 year ago

Hi sam,

Nice to get in touch with you. Your work on QRALib is amazing. Currently, i am working on a module to add dropdowns on total risk analysis exceedance curve and use the plotly graph as a dashboard. Can you help me confirming my process to disintegrate, total risk matrix into various risk names and summing it up to ,plot losses to the loss exeedance curve.

I hope you could understand my doubt, if not we can have a zoom call, at your availability.

Thanks Deepak

On Mon, Nov 14, 2022 at 12:02 PM Timothy Gray @.***> wrote:

Thanks! Adding Deepak who is helping build this out to see if he has other questions.

On Nov 9, 2022, at 1:33 AM, samlothen @.***> wrote:

Good question.

You can use as many simulations as you want. It depends on how certain you want that the simulation has covered all different cases. To reach a reasonably accurate result I would recommend at least 1000 for SMC or 150 for RMC. If you want a higher accuracy I would suggest running it with RMC and at least 1200 simulations. (SMC = Standard Monte Carlo, RMC = Randomised Quasi Monte Carlo).

The reason for the example having 100,000 simulations is that I used that for accuracy testing of the different methodologies. If you want to dive deeper into the subject I recommend reading the my thesis, which explored just that: http://uu.diva-portal.org/smash/get/diva2:1532891/FULLTEXT01.pdf

— Reply to this email directly, view it on GitHub https://github.com/samlothen/QRALib/issues/2#issuecomment-1308277413, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BGHSV4GDKFKBDNL5HHPZLWHNATJANCNFSM6AAAAAARODDKRM . You are receiving this because you authored the thread.Message ID: @.***>

samlothen commented 1 year ago

Hi Deepak,

I'm not sure I follow what you are trying to do. Can you elaborate?

Timberwolfz commented 1 year ago

Hi Sam

Hope you are well. I just had one other small question to ask you. In the QRALib model example, there are a few test_data combinations. In test_data_60, Do you think including 2 or 3 Ids with same name, frequency and impact distribution is helpful as compared to using just the one id per combination.

Thanks Deepak

On Mon, Nov 14, 2022 at 4:53 PM Deepak Arora @.***> wrote:

Hi sam,

Nice to get in touch with you. Your work on QRALib is amazing. Currently, i am working on a module to add dropdowns on total risk analysis exceedance curve and use the plotly graph as a dashboard. Can you help me confirming my process to disintegrate, total risk matrix into various risk names and summing it up to ,plot losses to the loss exeedance curve.

I hope you could understand my doubt, if not we can have a zoom call, at your availability.

Thanks Deepak

On Mon, Nov 14, 2022 at 12:02 PM Timothy Gray < @.***> wrote:

Thanks! Adding Deepak who is helping build this out to see if he has other questions.

On Nov 9, 2022, at 1:33 AM, samlothen @.***> wrote:

Good question.

You can use as many simulations as you want. It depends on how certain you want that the simulation has covered all different cases. To reach a reasonably accurate result I would recommend at least 1000 for SMC or 150 for RMC. If you want a higher accuracy I would suggest running it with RMC and at least 1200 simulations. (SMC = Standard Monte Carlo, RMC = Randomised Quasi Monte Carlo).

The reason for the example having 100,000 simulations is that I used that for accuracy testing of the different methodologies. If you want to dive deeper into the subject I recommend reading the my thesis, which explored just that: http://uu.diva-portal.org/smash/get/diva2:1532891/FULLTEXT01.pdf

— Reply to this email directly, view it on GitHub https://github.com/samlothen/QRALib/issues/2#issuecomment-1308277413, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BGHSV4GDKFKBDNL5HHPZLWHNATJANCNFSM6AAAAAARODDKRM . You are receiving this because you authored the thread.Message ID: @.***>