#39;);
exit;; _of_stocks [i]: = strtofloat (SG_Input_date. Cells [i, 3]); ('Вибачте, Ви не ввели ризик' + intToStr (i) + '-ої паперу!' );;;; sum <> 1 then
begin. MessageBox ('Вибачте, сума часток паперів повинна дорівнювати 1', 'Помилка!'); p align="justify"> exit;; _of_portfolio: = 0;: = 0; i: = 1 to number_of_stocks to number_of_stocks dodispersion: = dispersion + equity_share [i] * equity_share [j] * strtofloat (SG_Correlation. Cells [i, j]) * deviation_of_stocks [i] * deviation_of_stocks [j];
except ('Вибачте, Ви не ввели кореляцію' + intToStr (i) + '-ий і' + intToStr (j) + '-ої паперів!');
exit;;; _of_portfolio: = sqrt (dispersion);. Lines. Add ('Очікувана прибутковість портфеля:' + floattostr (roundto (profitability_of_portfolio, - 4)) + '%');. Lines. Add ('Стандартне відхилення прибутковості:' + floattostr (roundto (deviation_of_portfolio, - 4)) + '%');; TForm_for_ready_portfolio. FormCreate (Sender: TObject); _Input_date. Cells [0,0]: = 'Показник | Номер папери'; _Input_date. Cells [0,1]: = 'Частка'; _Input_date. Cells [0,2]: = 'Прибутковість'; _Input_date. Cells [0,3]: = 'Стандартне відхилення';: = 1;: = 1;; TForm_for_ready_portfolio. FormClose (Sender: TObject; Action: TCloseAction); _Risk_or_Profit. Close;; TForm_for_ready_portfolio.SG_Input_dateKeyPress (Sender: TObject; Key: Char); key of
'0 '.. '9', # 8, ',':; key: = # 0;;; TForm_for_ready_portfolio.SG_CorrelationKeyPress (Sender: TObject; Key: Char); key of p>
'0 '.. '9', # 8, ',', '-':; key: = # 0;;; TForm_for_ready_portfolio.SE_Input_countChange (Sender: TObject); i: integer; : = SE_Input_count. Value; i: = 1 to SEValue do_Input_date. Cells [i, 0]: = inttostr (i); _Correlation. Cells [0, i]: = inttostr (i); _Correlation. Cells [i, 0]: = inttostr (i); _Correlation. Cells [i, i]: = '1 ';; _Input_date. ColCount: = SEValue +1; _Correlation. ColCount: = SEValue +1; _Correlation. RowCount: = SEValue +1;; TForm_for_ready_portfolio.BClearClick (Sender: TObject); i, j: integer; i: = 1 to SEValue doj: = 1 to SEValue do_Input_date. Cells [i, j]: =''; _Correlation. Cells [i, j]: ='';;. Lines. Clear; _Input_count. Value: = 2;; TForm_for_ready_portfolio.SG_CorrelationSelectCell (: TObject; ACol, ARow: Integer; var CanSelect: Boolean); ACol = ARowbegin CanSelect: = False; exit; end; _CorrelationExit (Sender);: = ARow;: = ACol; ; TForm_for_ready_portfolio.SG_CorrelationExit (Sender: TObject); abs (StrToFloat (SG_Correlation. Cells [SelectedCol, SelectedRow])) <= 1 then SG_Correlation. Cells [SelectedRow, SelectedCol]: = SG_Correlation. Cells [SelectedCol, SelectedRow] ('Вибачте, кореляція не може бути більше 1!'); _...