<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Here's a reproducible example on how you can pass starting
    parameters and bounds:<br>
    <p>library(rugarch)<br>
      library(xts)<br>
      data("dmbp")<br>
      dmbp <- as.xts(dmbp, as.Date(1:nrow(dmbp)))<br>
      spec <- ugarchspec(mean.model = list(armaOrder = c(0,0),
      include.mean = TRUE), <br>
                         variance.model = list(model = "sGARCH",
      garchOrder = c(1,1), external.regressors = dmbp[,2]))<br>
      <br>
      setstart(spec) <- list("vxreg1" = 0.5)<br>
      setbounds(spec) <- list("vxreg1" = c(0, 1))<br>
      <a class="moz-txt-link-abbreviated" href="mailto:spec@model$start.pars">spec@model$start.pars</a><br>
      mod <- ugarchfit(spec, dmbp[,1])</p>
    <p>I suspect this may also be related to a parameter scaling issue
      as well. I'm working on a new implementation which should
      hopefully fix<br>
      this and many other issues (autodiff gradients/hessian, option for
      multiplicative regressors, parameter scaling. standard error
      calculation <br>
      options etc), but won't have something out for at least a few
      months (it will eventually be located in this repo:
      github.com/tsmodels/).<br>
    </p>
    <p>Regards,<br>
    </p>
    <p></p>
    <p>Alexios</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 1/11/23 12:31 PM, Simon van Norden
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:YQBPR0101MB51849AC8BD267E31ADF9B020A8FC9@YQBPR0101MB5184.CANPRD01.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style>@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0cm;}ul
        {margin-bottom:0cm;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Having trouble with bad initial parameter
          estimates in rugarch when using an external regressor.<o:p></o:p></p>
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoListParagraph"
            style="margin-left:0cm;mso-list:l0 level1 lfo1">Convergence
            code is 0 and convergence is rapid, but….<o:p></o:p></li>
          <li class="MsoListParagraph"
            style="margin-left:0cm;mso-list:l0 level1 lfo1">Coefficient
            estimate on the external regressor is always 0.00000 and
            condH = NaN<o:p></o:p></li>
          <li class="MsoListParagraph"
            style="margin-left:0cm;mso-list:l0 level1 lfo1">Results are
            robust to variable scaling and optimization algorithm (tried
            them all.)<o:p></o:p></li>
        </ul>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">My hunch is that I’m on a saddle point (or
          similar ‘flat spot’.)<o:p></o:p></p>
        <p class="MsoNormal">I’d like to try alternative initial
          parameter estimates for the external regressor; can anyone
          point me to an example showing how to pass this to the
          optimizer?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Would to happy to hear of other
          suggestions, or provide details, a reprex, etc.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">FWIW, this may be related to the question
          someone else posted back on 20-06-2022.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thnx<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span lang="FR-CA"><o:p> </o:p></span></p>
        <table class="MsoNormalTable" style="width:100.0%" width="100%"
          cellspacing="0" cellpadding="0" border="0">
          <tbody>
            <tr>
              <td style="width:100.0%;border:none;border-left:solid
                #009FDF 1.5pt;padding:0cm 7.5pt .75pt 10.5pt"
                width="100%" valign="top">
                <table class="MsoNormalTable" style="width:100.0%"
                  width="100%" cellspacing="0" cellpadding="0"
                  border="0">
                  <tbody>
                    <tr>
                      <td style="width:100.0%;padding:0cm 0cm 0cm 0cm"
                        width="100%">
                        <p class="MsoNormal"
                          style="mso-line-height-alt:9.75pt"><b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA"
                              lang="FR-CA">Simon van Norden</span></b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA"
                            lang="FR-CA"><o:p></o:p></span></p>
                        <p class="MsoNormal"
                          style="mso-line-height-alt:8.25pt"><b><span
style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA"
                              lang="FR-CA">Professeur Titulaire<o:p></o:p></span></b></p>
                        <p class="MsoNormal"
                          style="mso-line-height-alt:8.25pt"><span
style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA"
                            lang="FR-CA">Finance<o:p></o:p></span></p>
                      </td>
                    </tr>
                    <tr>
                      <td style="width:100.0%;padding:7.5pt 0cm 0cm 0cm"
                        width="100%">
                        <p class="MsoNormal"
                          style="mso-line-height-alt:8.25pt"><span
style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA"
                            lang="FR-CA">3000, chemin de la Côte‑Sainte‑Catherine,<br>
                            Montréal (Québec)  H3T 2A7<o:p></o:p></span></p>
                        <p class="MsoNormal"
                          style="mso-line-height-alt:8.25pt"><b><span
style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA">Telephone:
                              514 340 6781</span></b><span
style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
                      </td>
                    </tr>
                    <tr>
                      <td style="width:100.0%;padding:3.75pt 0cm 0cm
                        0cm" width="100%">
                        <p class="MsoNormal"><span lang="FR-CA"><a
                              href="http://www.hec.ca/"
                              moz-do-not-send="true"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:blue;border:none
                                windowtext
                                1.0pt;padding:0cm;mso-fareast-language:EN-CA;text-decoration:none"
                                lang="EN-CA"><img
                                  style="width:2.0833in;height:.275in"
                                  id="Picture_x0020_1"
                                  src="cid:part1.Iw4vXnWv.xVhZ1OMU@4dscape.com"
                                  alt="HEC Montréal" class=""
                                  width="200" height="26" border="0"></span></a></span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
                      </td>
                    </tr>
                    <tr>
                      <td style="width:100.0%;padding:4.5pt 0cm 0cm 0cm"
                        width="100%" valign="bottom">
                        <table class="MsoNormalTable"
                          style="width:100.0%" width="100%"
                          cellspacing="0" cellpadding="0" border="0">
                          <tbody>
                            <tr>
                              <td style="width:1.0%;padding:3.75pt
                                18.75pt 0cm 0cm" width="1%"
                                valign="bottom" nowrap="nowrap">
                                <p class="MsoNormal"><span lang="FR-CA"><a
href="http://www.hec.ca/decouvrez/choisir_hec/" moz-do-not-send="true"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:blue;border:none
                                        windowtext
                                        1.0pt;padding:0cm;mso-fareast-language:EN-CA;text-decoration:none"
                                        lang="EN-CA"><img
                                          style="width:1.0416in;height:.2416in"
                                          id="Picture_x0020_2"
                                          src="cid:part2.8AuTWZTL.HlqlWfBb@4dscape.com"
                                          alt="Agréments" class=""
                                          width="100" height="23"
                                          border="0"></span></a></span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
                              </td>
                              <td style="width:99.0%;padding:0cm 0cm 0cm
                                0cm" width="99%" valign="bottom">
                                <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-CA"><a
                                      href="http://www.hec.ca/"
                                      moz-do-not-send="true"><b><span
                                          style="font-size:10.0pt;color:#003C71;border:none
                                          windowtext
                                          1.0pt;padding:0cm;text-decoration:none">hec.ca</span></b></a><o:p></o:p></span></p>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><span
            style="mso-ligatures:none;mso-fareast-language:EN-CA"
            lang="FR-CA"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="FR-CA"><o:p> </o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:R-SIG-Finance@r-project.org">R-SIG-Finance@r-project.org</a> mailing list
<a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-finance">https://stat.ethz.ch/mailman/listinfo/r-sig-finance</a>
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
</pre>
    </blockquote>
  </body>
</html>