{"id":143,"date":"2024-01-02T13:42:12","date_gmt":"2024-01-02T13:42:12","guid":{"rendered":"https:\/\/lifestylerepository.com\/?page_id=143"},"modified":"2024-01-02T14:45:23","modified_gmt":"2024-01-02T14:45:23","slug":"stock-merger-average-calculator","status":"publish","type":"page","link":"https:\/\/lifestylerepository.com\/index.php\/stock-merger-average-calculator\/","title":{"rendered":"Stock Merger Average &#038; Arbitrage Calculator"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Stock Merger Average &#038; Arbitrage Calculator<\/title>\n    <link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.2\/css\/bootstrap.min.css\">\n    <style>\n        body {\n            background-color: #f8f9fa;\n        }\n        .container {\n            margin-top: 50px;\n        }\n        .btn-calculate {\n            background-color: rgb(0, 230, 115);\n            color: #fff;\n        }\n        .btn-clear {\n            background-color: rgb(255, 166, 77);\n            color: #fff;\n        }\n    <\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n    <h2 class=\"text-center mb-4\">Stock Merger Average &#038; Arbitrage Calculator<\/h2>\n    \n    <form>\n        <div class=\"form-group\">\n            <label for=\"quantityParent\">Quantities of Parent Company:<\/label>\n            <input type=\"number\" class=\"form-control\" id=\"quantityParent\" placeholder=\"Enter quantities of Parent Company\">\n        <\/div>\n        <div class=\"form-group\">\n            <label for=\"avgPriceParent\">Average Buy Price of Parent Company (Rs):<\/label>\n            <input type=\"number\" class=\"form-control\" id=\"avgPriceParent\" placeholder=\"Enter average buy price of Parent Company\">\n        <\/div>\n        <div class=\"form-group\">\n            <label for=\"marketPriceParent\">Current Market Price of Parent Company (Rs):<\/label>\n            <input type=\"number\" class=\"form-control\" id=\"marketPriceParent\" placeholder=\"Enter current market price of Parent Company\">\n        <\/div>\n        <div class=\"form-group\">\n            <label for=\"quantityChild\">Quantities of Child Company:<\/label>\n            <input type=\"number\" class=\"form-control\" id=\"quantityChild\" placeholder=\"Enter quantities of Child Company\">\n        <\/div>\n        <div class=\"form-group\">\n            <label for=\"avgPriceChild\">Average Buy Price of Child Company (Rs):<\/label>\n            <input type=\"number\" class=\"form-control\" id=\"avgPriceChild\" placeholder=\"Enter average buy price of Child Company\">\n        <\/div>\n        <div class=\"form-group\">\n            <label for=\"marketPriceChild\">Current Market Price of Child Company (Rs):<\/label>\n            <input type=\"number\" class=\"form-control\" id=\"marketPriceChild\" placeholder=\"Enter current market price of Child Company\">\n        <\/div>\n        <div class=\"form-group\">\n            <label for=\"ratio\">Ratio of Parent to Child (X:Y):<\/label>\n            <input type=\"text\" class=\"form-control\" id=\"ratio\" placeholder=\"Enter ratio (e.g., 1:3)\">\n        <\/div>\n        <div class=\"form-group\">\n            <button type=\"button\" class=\"btn btn-calculate mr-2\" onclick=\"calculateStockMerger()\">Calculate<\/button>\n            <button type=\"button\" class=\"btn btn-clear\" onclick=\"clearFields()\">Clear Fields<\/button>\n        <\/div>\n        <div class=\"mt-4\">\n            <h4>Result:<\/h4>\n            <p id=\"result\"><\/p>\n        <\/div>\n    <\/form>\n<\/div>\n\n<script src=\"https:\/\/code.jquery.com\/jquery-3.5.1.slim.min.js\"><\/script>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@popperjs\/core@2.5.2\/dist\/umd\/popper.min.js\"><\/script>\n<script src=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.2\/js\/bootstrap.min.js\"><\/script>\n<script>\n    function calculateStockMerger() {\n        var quantityParent = parseFloat(document.getElementById('quantityParent').value);\n        var avgPriceParent = parseFloat(document.getElementById('avgPriceParent').value);\n        var marketPriceParent = parseFloat(document.getElementById('marketPriceParent').value);\n        var quantityChild = parseFloat(document.getElementById('quantityChild').value);\n        var avgPriceChild = parseFloat(document.getElementById('avgPriceChild').value);\n        var marketPriceChild = parseFloat(document.getElementById('marketPriceChild').value);\n        var ratioInput = document.getElementById('ratio').value;\n\n        if (!isNaN(quantityParent) && !isNaN(avgPriceParent) && !isNaN(marketPriceParent) && !isNaN(quantityChild) && !isNaN(avgPriceChild) && !isNaN(marketPriceChild)) {\n            var parentToChildRatio = ratioInput.split(':');\n            var arbitrageProfitPerLot = (marketPriceParent * parentToChildRatio[0]) - (marketPriceChild * parentToChildRatio[1]);\n\n            var numberOfLots = quantityChild \/ parentToChildRatio[1];\n            var arbitrageProfitForUserScenario = arbitrageProfitPerLot * numberOfLots;\n\n            document.getElementById('result').innerHTML =\n                'Quantities of Parent after Merge: ' + (quantityParent + quantityChild).toFixed(2) + '<br>' +\n                'Average Buy Price of Parent after Merge: ' + (((avgPriceParent * quantityParent) + (avgPriceChild * quantityChild)) \/ (quantityParent + quantityChild)).toFixed(2) + ' Rs<br>' +\n                'Parent Invested Value per lot (' + parseFloat(parentToChildRatio[0]) + '): ' + (marketPriceParent * parentToChildRatio[0]).toFixed(2) + ' Rs<br>' +\n                'Child Invested Value per lot (' + parseFloat(parentToChildRatio[1]) + '): ' + (marketPriceChild * parentToChildRatio[1]).toFixed(2) + ' Rs<br>' +\n                'Arbitrage Profit per lot: ' + arbitrageProfitPerLot.toFixed(2) + ' Rs<br>' +\n                'Number of Possible Lots in your Scenario: ' + numberOfLots.toFixed(2) + '<br>' +\n                'Possible Arbitrage Profit in your Scenario: ' + arbitrageProfitForUserScenario.toFixed(2) + ' Rs';\n        } else {\n            alert('Please enter valid numeric values for all fields.');\n        }\n    }\n\n    function clearFields() {\n        document.getElementById('quantityParent').value = '';\n        document.getElementById('avgPriceParent').value = '';\n        document.getElementById('marketPriceParent').value = '';\n        document.getElementById('quantityChild').value = '';\n        document.getElementById('avgPriceChild').value = '';\n        document.getElementById('marketPriceChild').value = '';\n        document.getElementById('ratio').value = '';\n        document.getElementById('result').innerHTML = '';\n    }\n<\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Stock Merger Average &#038; Arbitrage Calculator Stock Merger Average &#038; Arbitrage Calculator Quantities of Parent Company: Average Buy Price of Parent Company (Rs): Current Market Price of Parent Company (Rs): Quantities of Child Company: Average Buy Price of Child Company (Rs): Current Market Price of Child Company (Rs): Ratio of Parent to Child (X:Y): Calculate &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/lifestylerepository.com\/index.php\/stock-merger-average-calculator\/\"> <span class=\"screen-reader-text\">Stock Merger Average &#038; Arbitrage Calculator<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"_links":{"self":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages\/143"}],"collection":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":5,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages\/143\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages\/143\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/media?parent=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}