Saturday, February 28, 2015

volatility - Swaption valuation across time using vcub


On Bloomberg one has access to the rates vol cube with the VCUB function. For a given currency, today, one sees Black implied volatilities for swaptions of various expiries and strikes, for forward swaps of various tenors. Suppose I see 80% of implied volatility for a 1y10y payer physically settled swaption. This means that the corresponding market price is $$\textrm{forward swap annuity} \times \textrm{Black}(s_0,80\%,\ldots)$$ where $\textrm{Black}$ is the Black function and $s_0$ is today's 1Y forward 10Y swap value and the $s_0$ quote is available on the market (on Bloomberg).


Now imagine I come the next week (in 7 days), and I want to value the same swaption in the Black model again. How can I do this using the vol cube in 7 days ?



Answer



Forget for a moment that your option is delivering the immediate entrance in a swap (if the swaption is physically settled) or the cash amount of the swap (if the swaption is cash-settled), as your question doesn't depend on this fact, and take a "general" 1Y option.



Your today's (date $t_0$) cube loses the "swap tenor dimension" and becomes a today's implied volatility surface, on which you read (through Black-Scholes function) the price of your option through implied volatity for 1Y expiry and given strike.


In 1W (date $t_0$+1W) your option will be an option on the same underlying (work it out in the swaption case) with same strike $K$ but expiry "1Y minus 1W" (date $t_1$). So to value your option 1W after, you need to know the implied volatility at $(t_1, K)$. And it this one is note quoted, you'll have to resort probably to interpolation, or even extrapolation.


To make it simple, the time $t$ price of the option is


$$\pi_t (T,K) = \textrm{Black}\left( \hat{\sigma}_t (T,K), T-t, K, s_t \right)$$


where $\hat{\sigma}_t (T,K)$ is the time $t$ implied volatility for expiry $T$ and strike $K$ (and swap tenor $10$Y) and where $s_t$ is the forward swap rate (for the underlying forward swap of the swaption) at time $t$.


As I said the fact that $\hat{\sigma}_{t_0} (T,K)$ is quoted (i.e. is directly readable on VCUB) doesn't imply that $\hat{\sigma}_{t_1} (T,K)$ will be, hence you'll probably have to resort to some interpolation to get $\hat{\sigma}_{t_1} (T,K)$ from values observables in VCUB at $t_1$.


Determine correct breakpoints to wireframe to a responsive website!


My problem is about choosing the right breakpoints for a responsive website as it's wireframing (Not determining in the code phase). I am having trouble about this. Because many people say that choose different breakpoints. For example in the below websites if you look at them you'll see that there are number of different suggestions. Some recommend to choose 5 breakpoints. Some recommend to choose just 3 (mobile,tablet,desktop). But I confused. Here are links about different suggestions: http: //support.balsamiq.com/customer/portal/articles/615901 http://getbootstrap.com/css/ What are the ideal widths a website should be designed for on a phone/tablet/computer? And many suggestions more than that.


For example, Bootstrap suggests 4 different breakpoints. These are small-tablet-desktop-large desktop. Can anyone tell me what is the best way to choosing correct breakpoints? I had decided to choose tree: 320px to 480px, 480px to 768px (for the mobile landscape orientation), 992px, 1200px+ But one more question occurs at this time. Which sizes do I need to use between these two: 320px or 480px? and 480px or 768px (for the mobile landscape orientation).


Edit: The other question that is really important for me is: Let's we assume that I've chosen the number of breakpoints I will use but what should be the size of them? For example, some grid system has 980 width some has 992 width (like in bootstrap) and some has 960px width. There are really confusing for me to determine the correct breakpoint width for wireframe. Thank you...




adobe illustrator - Is this calligraphy style working for my brand?


I would like to know if the calligraphy style signature looks good and if the type face for miss graphics compliments it. Also, which colour scheme looks best. Thank you :)My personal logo


Miss here means mr. mrs. ms.


I am a female so I am Miss Graphics basically. The calligraphy is a signature I created myself of M and G. Design process involved experimenting with various icons and signature fonts but in the end I decided to go for signature logo given the fact that Miss Graphics should look like my name and the signature has to represent that.


When I couldn't find the right font I drew the M and G myself on touch screen and added calligraphy brush effect on illustrator. This process has taken place over a very long period of time but I want to finalize my branding now. People already know me by the name "Miss Graphics" so there is no changing that. I just need to decide on the branding. I would love your opinion on whether this signature look is working or I should try something else. Thank you :)



Answer




There are many things that can be improved on your logo




In graphic design there aren't many dogmas, but I dare to say one of them is never present a framed logo unless that frame belongs to the design. The grey frames are destroying your three logos. If this were for a client, he/she would wonder how the logo would look like alone, without the grey frame. Or worse, they could ask to change the frame color!!! You are putting the grey frame as another element to consider in your logo when in fact it isn't part of it.


logos




Personally I discovered that it's a signature after reading the question. If I had to gather the main features of a signature are:



  • Fast and thin line

  • Floating in the air or above a dotted or thin line

  • Dark color



None of the three is represented in the signature, which makes it difficult to interpret it immediately.




One of the Gestalt laws is the proximity:



The Law of Proximity states that objects that are near or 'proximate' to each other tend to be grouped together.



The closeness between the signature and the text makes everything to be interpreted as a single element, taking away the signature's presence. My first impression was a baby lying down.


Baby


I think it's necessary to extend the distance between the text and the signature so that it's interpreted as such:



Distance


Or make the text have a double reading: as a text and as the signature baseline:


baseline


Finally, if there was a statistic of the ink color we used when signing, we could say 50% black ink, 40% blue ink, a minimum percentage of red ... but baby blue??? yellow????...may be, but the further away from the essential color of a signature is, the less it will look like.




I didn't do any analysis of the small text, you can barely see it. In a logo reduction will disappear completely.


interface design - Inspiration from existing works - where is the limit?


I am trying to create icons for the UI of my website to represent key concepts of my trade such as "translation services", "languages", "translation tools"... and I am having a hard time to come up with good ideas.


So, I went and looked at some existing pictures on Google Images and Stock photo to find inspiration.


My designs are done from scratch, they are clearly different from the originals, but they were inspired by it. For instance, seeing a set of regular dices show up in a "translation" search inspired me to do this:


Language dices


I am pretty sure that's Ok. On the other end, my new years wishes card:



New Year wishes


is somewhat based on this wish card design. I am in two minds on that one. Is it different enough? I haven't sent it yet, and will most likely buy the rights just to be sure before I use mine, but it definitely raises the question of finding the right limit between inspiration and copyright infringement.


Is it at all acceptable to look at other people's creations on the subject before doing your own take on it? If not, where do you find the inspiration for your designs?


If you consider it OK to look at existing works on the Web for inspiration, how do you draw the line between "finding inspiration" and "illegal copy"?



Answer



Your question is partly ethical and partly legal. I don't believe anyone here is a lawyer, qualified to speak to the legalities involved, and anyone who is probably wouldn't want to.


From the ethical standpoint, you have your sensibilities straight. Your card is closely derived from the stock design, in that your layout and colors are pretty much identical, with only minor variations in the typography and snowflakes -- pretty much what any designer might do with that template after licensing it. Licensing the image will calm that inner voice whispering "plagiarism" in your ear.


As to where that fuzzy line between inspiration and plagiarism is drawn, well, here's legitimate inspiration: you see something that works well -- a technique or a design element that strikes you as particularly appropriate or effective -- and you mentally (or physically, if it's a magazine ad or similar) file that away in your personal library of techniques that you can bring to bear on your own projects. Every designer worth his or her Pantone ink has an idea file or two, or three, each filled with just that kind of thing. This is not only legitimate, it's essential.


Conversely, if you were to take a great magazine ad and copy its complete style, the pose of the model, the lighting, the typography and the colors, you're plagiarizing, which may or may not open you up to a copyright lawsuit. But if you don't let your conscience, which has the right idea, be your guide, you will end up despising yourself even if nobody ever says a word about it.


Only a tiny percentage of design work (or any form of art, for that matter) is truly original. Of that percentage, only a subset is actually useful, far less trendsetting. It is far too easy to let a false desire to "be original" get in the way of communicating effectively to your audience.



A professional designer will "start from scratch" on most designs, but the whole process is informed by current and earlier work, by self and others, that has been effective in getting the message across. When all is said, graphic design has no other purpose or value than effective communication.


Friday, February 27, 2015

gui design - What is the significance of the three dots "..." on menus and buttons and how to use them right?


Adding three dots after the title of items in a dropdown menu seems to be a common practice (as you can see on the picture of a drop down menu in Google Chrome). They generaly mean that there is "something" after clicking on it.


Google chrome dropdown menu (french version)


These dots are also sometimes presents in the text of action links and buttons.


I am wondering about their utility and relevancy...


In your opinion :



  • What kind of information should be conveyed by these dots ?


  • How and when to use them ?

  • Is it realy relevant to the user, and easily understood by them ?



Answer



These dots, referred to as an ellipsis, always mean that there are additional options. For example when you see "Print..." it is indicating that there will be another step before there is anything sent to the printer.


Taken from The Microsoft UX Guidlines:



Design concepts Using ellipses


While command buttons are used for immediate actions, more information might be needed to perform the action. Indicate a command that needs additional information (including confirmation) by adding an ellipsis at the end of the button label.


In this example, the Print... command displays a Print dialog box to gather more information.



By contrast, in this example the Print command prints a single copy of a document to the default printer without any further user interaction.


Proper use of ellipses is important to indicate that users can make further choices before performing the action, or even cancel the action entirely. The visual cue offered by an ellipsis allows users to explore your software without fear.


This doesn’t mean you should use an ellipsis whenever an action displays another window—only when additional information is required to perform the action. Consequently, any command button whose implicit verb is to “show another window” doesn’t take an ellipsis, such as with the commands About, Advanced, Help (or any other command linking to a Help topic), Options, Properties, or Settings.


Generally, ellipses are used in user interfaces to indicate incompleteness. Commands that show other windows aren’t incomplete—they must display another window and additional information isn’t needed to perform their action. This approach eliminates screen clutter in situations where ellipses have little value.



intuition - Is a grayscale bar a bad way of showing temperature?


In my office there is an air conditioning unit that has a knob that adjusts the temperature with a grayscale bar with the shades getting darker from left to right above it but no other indication (such as numbers, a snowflake, etc). Sort of like this image:


enter image description here


This is very confusing to me. Typically I would think that temperature indicators would go from left to right (cold -> warm). But what if this isn't temperature but rather intensity where a higher intensity blast of air would result in colder temperatures? (off -> full blast)


Is white cold and black warm? Or white low intensity and black high intensity? Is it a badly designed indicator or are my intuitions off?


Bonus: What would be an idea for a better but just as minimalist design? How universal is this current design? Would snowflakes make more sense and how well understood would that be in climates with no snow? I don't think numbers would help unless they are associated with temperatures explicitly.



I took a photo of the knob. It doesn't look exactly like my illustration (in my defense it was dark inside the grid :-P )


enter image description here



Answer



Yes, it's bad design for its lack of signifiers (signs in the world that offer guidance).



  • You can't distinguish what device it belongs to by just looking at it.

  • You can't know its purpose without trying it out.

  • It does't show its state clearly. Could we establish a clear relationship between one state and one temperature easily and consistently? I don't think so.


Adding one or more signifiers will help to improve it, some examples (more or less ordered from best to worst based on my preference):




  • Numbers: representing temperature or "level of intensity" (the last one will also need a complementary signifier to know if the bigger number, the higher or lower temperature.)

  • "Cooler" and "Warmer" labels in each corresponding extreme. Depending on the amount of states and if they really make a difference in the functionality you could add other intermediate states.

  • Cooler-Warmer symbols. A sun, curvy lines (as wind), classic snow icon.

  • Use of colors (warm and cold colors). Luckily for this case, blue color blindness affect less people than red and green color blindness.


character development - What to avoid when writing a villain?



The villain so far has only appeared in two chapters. However now he's making a return in a chapter which is mostly about him, his actions and his past. Now. What are mistakes I should avoid when writing a villain, one that'll play a role till the end?




usability - Should users be allowed to use any special character they want when creating a password?


I came across a number of login configuration settings where there is a list of allowable special characters and was wondering:


Does this limitation cater for a specific security or usability need?


Example: A list of special characters supported by Oracle Identity Manager and Microsoft Active Directory for password field :


enter image description here


Update:


Thanks everyone for the generous response!



Every time I have asked a question that involves security and usability there seems to be a clear divide between proponents on each side. However this need not be as this is one area that requires a lot of compromises and trade-offs… UX depends on it!



Answer



If the user can type it then it should be allowed in their password.


Telling someone what they can and can't use in their password always feels wrong to the user. Passwords are currently the most universal way to authenticate. Preventing users from entering anything is, in essence, telling them who they can or can't be.


1. Any printable character that a user inputs should be allowed.


The following characters are okay...


'A', 'a', 'á', 'Æ', 'æ', 'Ñ', 'ñ', '-', '_', ' ' (space), '\t' (tab), '\n' (newline), ...


Just because I don't know how to submit a TAB or ENTER character as part of my password doesn't give me the right to prevent others from doing so.

(Don't worry, few people will try to submit an ENTER character as part of their password but allowing the few that do will earn their respect.)



2. Keys that don't display a printable character should not be allowed.


The reasons for this should be obvious but for completeness I will mention the following keys which can be detected but are reserved for other actions. For example, a password input shouldn't record that the shift was hit multiple times...


[ctrl], [alt], [shift], [arrow keys], [apple key], [windows key], etc.

3. Not allowing certain characters makes users question your security.


When you prevent users from putting certain characters in their password it not only annoys people but causes many of them to question what else you are doing that isn't secure.


You may as well be saying...




"Hey we don't want to fix our application to properly deal with special characters so would you mind helping us out by making your password less secure?"



The rules below will allow for secure input while preventing a user from ever getting stuck:




  • Don't show the characters that the user is typing in password fields (there are some exceptions on mobile)




  • Having the user type in their password twice is usually sufficient in letting them know that they got it right (i.e. didn't accidentally add unintended white space etc.)





  • Having a password reset mechanism is important to handle any cases of accidental lockout.




4. Encouraging a user to add more isn't the same as prohibiting characters.


One way to help a user come up with a secure password is to make a game out of it...


password strength indicator


5. The future of authentication


"The Tech That Will Kill Passwords Dead" is a pretty good gizmodo article discussing the problems we all face with passwords. It also talks about some new patterns that could possibly replace passwords one day.


Many mobile applications are starting to allow users to show or hide passwords in plain text in order to increase ease of use and remove one barrier to entry. I would still avoid this because the problem it creates is worse than the problem it solves.



Even with a very intuitive mechanism for showing/hiding a password 60% of users still say it feels wrong to see passwords in clear text.


According to that same article it appears that Touch ID is on the right track and easily wins as far as usability is concerned. Touch ID still has some major problems that make it impractical. The biggest being that it only works on select devices and has issues with one person controlling multiple accounts.


Facial recognition is another contender as an increasing number of high pixel density cameras make their way into the world but this approach often leaves people worrying about privacy.


The one problem shared by all of these new authentication attempts is this: You are the password.


It's actually a lot easier to fake who you are than what you know. In addition, once you've been compromised it's nearly impossible to change (your fingerprints for example)


Passwords are the authentication mechanism of choice for a good long while so...


Please don't place arbitrary character limitations on my password. Thanks!


Thursday, February 26, 2015

novel - I have too much dialogue, how do I add more description?


I was looking at the last book I wrote. In it, I failed to meet the word count I had set for myself by a big margin, like 40,000 words instead of 60-70,000.



Doing a post mortem, I found that most of my work has a lot of dialogue, and very little description. But when I look at published books, they use a mixture of dialogue and description / narrative summary.


How do I add some description to my book, without turning it into "telling", or boring the reader with unnecessary detail?



Answer



First of all, don't let yourself become a prisoner to your word count. If your story is complete and it only has 40,000 words, then so be it. It sounds like you need to ask yourself whether or not your story really is complete. If it takes place in one location and is almost entirely between two characters, then you may not have a lot to describe. However, if you are changing scenes and settings, then you need to make sure your readers are able to recognize that.


One of the ways you can do that is to identify things that are happening around them. Say for example they are walking down the street having a conversation. You can comment on how they pass under a street light or have to cross to the other side of the street because of a barking dog on the sidewalk ahead of them. The main point is to give enough information to allow your readers to picture your characters in whatever they are doing.


If you go back and add some of these things, you need to review it really carefully and make sure they add something of value to the story. If they are just there as filler, your readers are going to recognize that and get annoyed. If your additions paint a better picture, then your readers will be rewarded.


typography - Implementing the Dutch IJ digraph as a ligature


I'm designing a display typeface and having some trouble deciding how to implement the uppercase Dutch digraph "IJ". I have designed a ligature that combines the "I" and "J" to form what looks like a broken "U".



Here is a comparison of my "IJ" ligature against the distinct "I" and "J" glyphs:


enter image description here


According to Wikipedia, an "I" followed by a "J" doesn't always form a digraph; would the ligature still be acceptable in those cases, or would that be considered incorrect?


I'm going to include the ligature in the font, there is no question there, my only problem is how to implement it and make it available to users through OpenType features and the use of the IJ Unicode character. How should I consider the language/locale of the user? Should the ligature be the default;



  • e.g. used for the "IJ" character and as a standard ligature (OpenType feature liga) for "I"+"J"?


Or an optional stylistic alternative;



  • e.g. stylistic alternate (OpenType feature salt) for the "IJ" character and a discretionary ligature (OpenType feature dlig) for "I"+"J"?





Note, I'm asking about the technical implementation (through OpenType features) here; For critique of the ligature design itself see Is this Dutch IJ ligature suitable and readable to native speakers?.




website design - What to put in my portfolio if I have not had any clients yet?


I am a newbie self taught web designer. My skills are HTML/CSS web designs. My problem is, how do I start marketing myself or what type of web designs should I put in my portfolio if I have not had any clients yet?



Answer



There is something that worries me more than the lack of clients.


Are you good? Are you good enough to have a first nonprofit client?


Do you have a personal web page? I do not mind if it is on a free hosting service. I do not mind a couple of ads at the top.


Do you have some screen captures of design ideas, as a single jpg posted perhaps on deviantart.com?


I do not mind a portfolio of fake clients. That is totally fine with me, as long as the work looks good (and it is well structured) (Guess what... that could be sold as a template)


So, the first client you need to have is yourself. Then you can make some variations on a "Your company name" "template". Then, I could see if you actually know HTML and CSS, and actually know how to "design" a website.





This "templates" could be business oriented too.


A template for dentists where you actually analyze what a dentist could need, for example, a form to appoint a date, A photographer's portfolio with some categories for different types of photos, etc.




P.S. "Web designer" is a pretty complex term.


It could imply:




  • Designing the structure, the flow, the content architecture.





  • UX interfaces, assets, look.




  • Tag coding.




  • CSS/Frameworks usage.





  • Adaptable design.




  • Development skins for specific platforms.




  • JavaScript programming.




  • Some basic understanding of backend programming.





  • Etc.




So, you probably need to learn a couple of things more.


Android design convention for saying a user needs to complete an action first?


I've read the Android design conventions, but can't see a good solution.


I have a 3 tab mobile application. Tabs 2 and 3 need a selection made on screen 1 before they will work. The user enters at Screen 1, and the tab options are along the top. If they attempt to open screen 2 or 3, I would like to advise them to make a selection first. 'notifications' are the closest answer I can see from the Android design guidelines. Anybody have any other solutions?


Thanks


Andy



Answer



Tabs indicate that there are different views of related information that can be swapped between at any time. Showing tabs and not allowing them to be used adds cognitive friction.


I wouldn't show the tabs at all until after a selection is made on the first screen. Be sure to keep the first screen as simple as possible and only ask for the minimum amount of user input (in your case initial selection). Additional information can be shown on the first tab along with the other tabs now showing across the top giving added confirmation that the first selection opened up additional possibilities.


If getting rid of the tab control until it makes sense isn't possible then make sure to be explicitly clear to the user when the action they are trying to perform isn't doing what they expect and how to remedy the situation.



A Notification has the advantage of not getting overlooked but just make sure it is direct and to the point...



"Select a product from the current tab before switching." [ OK ]



country - Placement of a Change language button


Where would you place a Change language button/Country selector (or dropdown) on a web page? In a footer menu or in a utility menu in the top right corner of a web page or somewhere else on the page? What are your findings? Where does it feel most natural?




Answer



I won't go for the note in the footer since the primary use of such a selector is when landing the very first time on the website, as soon as the user sees that he does not understand the site language, he must not have to scroll to the footer to switch language.


But this should be a secondary action. So given the cultural context, I'll put it on the top right corner for left-to-right layout.


Wednesday, February 25, 2015

stochastic processes - CIR model: is the short rate really non-central $chi^2$ distributed?


Probably simple question. Consider the CIR (1985) model for interest rates $$ dr = k(\theta - r)dt + \sigma \sqrt{r}dz $$ Then it is known in closed form the conditional pdf $f(r(s),s|r(t),t)$ ($s \geq t$) $$ f(r(s),s|r(t),t) = ce^{-u-v}\left(\frac{v}{u}\right)^{q/2}I_{q}(2\sqrt{uv}) $$ where \begin{equation} \begin{aligned} c &=\frac{2k}{\sigma^{2}\left(1-e^{-k(s-t)}\right)}\\ u &=cr(t)e^{-k(s-t)}\\ v &=cr(s)\\ q &=\frac{2k\theta}{\sigma^2}-1 \end{aligned} \end{equation} and $I_{q}(\cdot)$ is a modified Bessel function of the first kind of order $q$.


Then authors state:



<< The distribution function is the non central chi-square $\chi^2[2 c r(s); 2q + 2, 2u]$, with $2q+2$ degrees of freedom and parameter of non centrality $2u$ proportional to the current spot rate. >>



Then my questions:



1) Is it correct to say that what is (conditionally on $r(t)$) non-central $\chi^2$ distributed is the variable $2cr(s)$?


I can answer by my own to this question: Since the conditional expectation $E(r(s)|r(t))$ and variance $Var(r(s)|r(t))$ are provided in the paper (Eq. 19), it'easy to check the validity of 1) verifying that: \begin{equation} \begin{aligned} (2q+2) + (2u) &= E(2cr(s)|r(t)) = 2c E(r(s)|r(t))\\ 2[(2q+2) + 2(2u)] &= Var(2cr(s)|r(t)) = 4c^2Var(r(s)|r(t)) \end{aligned} \end{equation} where l.h.s. of both equations are expressions for the first two moments of a non-central $\chi^2$ variable with $2q+2$ and parameter of non-centrality $2u$ (you may want to check Wikipedia).


2) If 1), which is the conditional distribution of $r(s)$ alone? Is it still non-central $\chi^2$?


I want to be crystal clear: we know that $2cr(s) \stackrel{|r(t)}{\sim} \chi^2(2q+2,2u)$. Moreover, we know in closed form the (conditional on $r(t)$) pdf of $r(s)$ (the $f(r(s),s|r(t),t)$ above)... but then, is $r(s)$ a KNOWN random variable ($|r(t)$)? In particular, is it still non-cenral $\chi^2$ distributed? (*)


Thanks for your attention


(*) I'm afraid $r(s)$ cannot still be non-central $\chi^2$ since this would imply that the non-central $\chi^2$ would be close w.r.t. scaling of the variable, and - I'm not sure - this should not be the case.



Answer



To answer this I sum up a paragraph of "Interest rate models - An Introduction" by A.Cairns: For $i=1,\ldots,d$ consider the OU-processes $$ dX^i_t = -\frac 12 \alpha X^i_t dt + \sqrt{\alpha} dW^i_t. $$ Looking at the squared radius $R_t = \sum_{i=1}^d (X^i_t)^2 $ (in $\mathbb{R}^d$) of this process we get by Ito: $$ dR_t = \sum_{i=1}^d (2 X^i_t dX^i_t) + d \alpha dt. $$ Using the definition of $R_t$ introducing a new Brownian motion $B_t$ we get in distribution that that $$ dR_t = \alpha (d - R_t) dt + \sqrt{4 \alpha R_t} dB_t. $$ Defining $r_t = R_t/\theta$ with $\theta = 4\alpha/\sigma^2$ this is the CIR model. This gives a nice geometric interpretation. I am aware that not all details are covered here.


Recall the definition of the non central chi-squared distribution. Let $$ R = \sum_{i=1}^d (W_i + \delta_i)^2 $$ and $\lambda = \sum_{i=1}^d \delta_i^2$, then $R$ has a non-central chi-squared distribution with $d$ degrees of freedom and non-centrality parameter $\lambda$.


Since the $X_i^t$ above are all normally distributed with variance $1- e^{-\alpha t}$ we see that $R_t/(1- e^{-\alpha t})$ has non-central chi-squared distribution. Finally we have that for $d = 4 \alpha \mu/\sigma^2$ that $4 \alpha r_t/(\sigma^2 (1- e^{-\alpha t}))$ has a non-central chi-squared distribution with $d$ degrees of freedom and non-centrality parameter $\lambda = 4 \alpha r_0/(\sigma^2 (1- e^{-\alpha t}))$.



Conditionally on $r_t$ replace $r_0$ by $r_t$.


The answers then are: i) Yes, the variable that has non-central chi-squared distribution is the complicated expression that you mention.


ii) Only this complicated expression is non-central chi-squared distributed - $r_s$ itself is not. As you see in the link the non-central chi-squared distribution relates to standardized Gaussians (variance equals 1). Maybe the Generalized chi-squared distribution could be of help. But I don't know this.


What are some good projects for my portfolio?


I'm a student and I started my first portfolio. I'm doing some "fake jobs." I can do 3D and 2D (I'm not so good at drawing [yet]). In the future I hope to work with designing album covers, posters, and such.


What are some good projects for my portfolio?




adobe photoshop - Achieving a printed on paper look



Firstly, thank you for taking the time to look at my question.


So, I'd love to know how to achieve this effect (pic below). As you'll see it looks as though the ink is sitting on the brown paper and the ink hasn't totally covered it.


Thank you so much for your time and response.


enter image description here





Can someone explain me the concept of image resolution in photoshop in relation to indesign and illustrator?


My file has resolution of 150 ppi, i duplicate that file and made another one of resolution of 300 ppi, with resample checkbox turned off. As a consequence of that, pixels from both images haven't changed and are the same, while only print size changed.


When i exported both files, one with 150ppi and one with 300 ppi, they were the same size 1.0 mb, even the information on jpeg is measuring the same pixels dimensions.


But when i place both of my images in illustrator, the one with 300ppi has smaller size, also when i placed it in indesign the one with 300 ppi is smaller, and the one of 150 ppi is larger.



How so, when they have the same pixel dimensions?


Can someone explain me logic behind this.


Thanks.



Answer



Yes.


Both files have the same number of pixels, so the same file size and image quality.


But when you import your images to InDesign, which takes into account image resolution to print them (since DPI is dots per inch, meaning it's useful to measure how large an image will print in a physical medium) the image with 300dpi will look smaller, because it has more dots per inch. Each pixel will be printed smaller on paper so it can fit more dots per inch.


An image 1000px x 1000px at 1000DPI will print at 1" x 1". The same exact image at 500DPI will occupy 2" x 2" when printed on paper. Simple math, you're just printing the pixels larger. Got it?


Photoshop doesn't care about the resolution, you're editing the image pixels there. 1000px are still 1000px no matter what resolution. It might make a difference when adding text, since the font sizes are usually pt and Photoshop will scale it differently based on the resolution, but if you set a font size to 20px it will also look the same regardless of the resolution. The resolution setting is there because you'll need it when printing.


Tuesday, February 24, 2015

forms - What are the advantages and disadvantages of multi-window functionality vs single-window functionality?


I am considering porting a windows application to a web application for one of my clients. The windows application is an MDI app (multiple forms open at once), but obviously the web app would be much more "linear" in the workflow, i.e. one window open at once (for the most part).


I guess I wonder two things.



  • What are the advantages and disadvantages of multiple window (one per form) vs single window (using Back and Forward for multiple forms) UI?

  • Is it possible/common/acceptable to have a web app that is designed to have multiple browser windows open at the same time for the same application?



Answer



First a terminology issue to try to eliminate confusion: "multiple document interface" (MDI) is a design where an application has a single “container” window within which the user can view multiple document windows (which each may be a form). This specifically refers to a design promoted by Microsoft for various productivity apps like early versions of MS Office. The alternative to MDI was a single document interface (SDI), where there is no container window -each document has it own top-level window. This implies that each document was also a separate process and thus SDI for multiple documents requires greater computer resources than MDI. However SDIs have better usability owing to their greater simplicity, so, with today’s powerful computers, MDI is obsolete and has been largely abandoned. MS Office partially moved away from it in 2002.


I don't think you mean to discuss the merits of "MDI."



To get at your question, I prefer to distinguish between “history navigation” versus “window navigation,” where the former is web-style and the latter is desktop style. Both support multiple “open” forms in a single application. The difference is how users navigate among the opened forms. History navigation has an implicit historic list of forms (or other pages) you can “move” back and forth through. Windows navigation has each form in a separate window so users “navigate” (if you want to call it that) by simply clicking on the opened window for the form they want.


Which is better? History navigation works best when users work superficially on many pages/forms, skimming for content, ignoring most of it, and only occasionally providing any input other than navigation. Window navigation works best when users work intensively on a few forms, providing substantial input (e.g., more than 30 seconds of work). In history navigation, forms effectively close themselves by simply being neglected, which is fine for superficial work, but a real drag if it means losing track of a lot of unsaved work.


For form-type work, window navigation has the following advantages over history navigation:




  • Simpler, faster, and more visual navigation for recently used pages. See the page you want and click on it. No going back or forward multiple times. No mentally tracking history.




  • “Paging” can be used for other purposes, such as showing multiple database records in the same window.





  • Exiting or logging out leaves no ambiguous pages apparently available for access. Log out with history navigation and the user can still back into the pages in the history chain, which is confusing at the least.




  • Input is preserved when the user navigates to another page. It obvious that a form in one window should not be cleared simply because the user has clicked on another window then returned focus to the original window. History navigation traditionally clears the form when the user navigates away from it and then returns, which is usually the wrong thing to do, but sometimes the right thing –there really isn’t a good way of dealing with it.




Assuming your window-navigation app is already performing well with users, don’t mess it up by trying to switch it into a history-navigation app. The main challenge will be getting users to not treat the opening of new windows as “pop-ups” to be blocked or closed. Another issue is the computer expertise of your users. Many low-end users don’t know how to handle multiple windows. They run every window maximized and seem unaware of the task bar. However these same users know how to use the back button on the browser.


I’ve more details of history navigation versus window navigation at Turn the Page. It also includes details of properly designing a windows-navigation web application.


mobile - How can I represent multiple pins at the same location on a map?



I'm building a very small app that allows my users to post content to a map.


The home screen of the app contains a map with all of the posts (as seen below).


PROBLEMS


01 - if a user posts a post from the same area, two pins will be on top of each other so you won't be able to access one of them


02 - if a lot of content is posted it will be hard to click on each pin


03 - when you zoom all the way out, there will be too many pins


Can anyone recommend trying anything else please?


enter image description here




fixed income - Do FRN's *always* trade on par on reset days, regardless if the issuer's credit quality has changed?


I keep reading that floating rate notes trade on par on coupon reset days.


Is this always true, regardless of changes in the issuer's credit quality since the FRN was issued?



It seems probably that a change in the issuer's perceived credit quality should be visible in the price, but I am a novice in this area...




option pricing - Why is the ATM vol kind of an average volatility


In this question I asked about the mathematical rationale of using the ATM vol to price quanto options. One of the reasons pointed (as an answer) was, as expected, that the ATM volatility is kind of an average volatility.


What is missing is to prove this mathematically or at least give some intutiton of why this is true through mathematical equations. Could you please provide the mathematical reasoning for the conclusion that the ATM vol is kind of an average volatility?


Thank you




Monday, February 23, 2015

programming - Finance: Portfolio - Long Short Portfolio construction


I am trying to construct a Long / Short portfolio in R. Say I have two portfolios Tech and Mature and I want to go long on the Tech portfolio and short on the Mature portfolio.


I collect and download the data using:


tickers <- c("GOOG", "MSFT", "GE", "WAL")

library(tidyquant)
library(dplyr)
library(tidyverse)

library(glue)



data <- tq_get(tickers,
get = "stock.prices",
from = "2010-01-01",
to = "2015-01-01") %>%
group_by(symbol) %>%
tq_transmute(select = adjusted,

mutate_fun = periodReturn,
period = "monthly",
type = "arithmetic") %>%
mutate(portfolio = case_when(
symbol == "GOOG" ~ "Tech",
symbol == "MSFT" ~ "Tech",
symbol == "GE" ~ "Mature",
symbol == "WAL" ~ "Mature"
),
date = ceiling_date(date, "month") - days(1)) %>% # set the date to the end of the month

group_by(portfolio, date) %>%
summarise(
Port_Monthly_Rets = mean(monthly.returns)
)

Which looks like:


# A tibble: 120 x 3
# Groups: portfolio [2]
portfolio date Port_Monthly_Rets


1 Mature 2010-01-31 0.173
2 Mature 2010-02-28 0.0639
3 Mature 2010-03-31 0.0605
4 Mature 2010-04-30 0.283
5 Mature 2010-05-31 -0.104
6 Mature 2010-06-30 -0.111
7 Mature 2010-07-31 0.0659
8 Mature 2010-08-31 -0.130
9 Mature 2010-09-30 0.113
10 Mature 2010-10-31 -0.0563

# ... with 110 more rows

I also download the Fama French Factors:


# Collect Fama French Factors:

temp <- tempfile()
base <- "http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/"
factor <- "North_America_3_Factors"
format<-"_CSV.zip"
full_url <-glue(base,factor,format,sep ="")

download.file(full_url,temp,quiet = TRUE)

FF_Factors <- read_csv(unz(temp, "North_America_3_Factors.csv"), skip = 6) %>%
rename(date = X1) %>%
mutate_at(vars(-date), as.numeric) %>%
mutate(date = rollback(ymd(parse_date_time(date, "%Y%m") + months(1)))) %>%
drop_na(date) %>%
rename(Mkt_Rf_3 = `Mkt-RF`,
SMB_3 = SMB,
HML_3 = HML,

RF_3 = RF)

I join everything together and compute the excess returns:


# Join factors with portfolios

df <- data %>%
left_join(FF_Factors, by = "date") %>%
mutate(R_excess = Port_Monthly_Rets - RF_3)

Which now looks like:



# A tibble: 120 x 8
# Groups: portfolio [2]
portfolio date Port_Monthly_Rets Mkt_Rf_3 SMB_3 HML_3 RF_3 R_excess

1 Mature 2010-01-31 0.173 -3.63 0.45 0.89 0 0.173
2 Mature 2010-02-28 0.0639 3.71 0.86 2.35 0 0.0639
3 Mature 2010-03-31 0.0605 6.27 1.5 1.48 0.01 0.0505
4 Mature 2010-04-30 0.283 1.92 3.73 1.9 0.01 0.273
5 Mature 2010-05-31 -0.104 -7.86 0.74 -2.32 0.01 -0.114
6 Mature 2010-06-30 -0.111 -5.5 -1.07 -3.73 0.01 -0.121

7 Mature 2010-07-31 0.0659 6.95 0.02 1.03 0.01 0.0559
8 Mature 2010-08-31 -0.130 -4.44 -1.61 -2.35 0.01 -0.140
9 Mature 2010-09-30 0.113 9.47 3.67 -1.85 0.01 0.103
10 Mature 2010-10-31 -0.0563 3.89 0.98 -1.55 0.01 -0.0663
# ... with 110 more rows

I run Fama French regressions on my portfolios:


summary(lm(R_excess ~ Mkt_Rf_3 + SMB_3 + HML_3, data = subset(df, portfolio == "Mature")))
summary(lm(R_excess ~ Mkt_Rf_3 + SMB_3 + HML_3, data = subset(df, portfolio == "Tech")))


For example, the Tech portfolio looks like:


Call:
lm(formula = R_excess ~ Mkt_Rf_3 + SMB_3 + HML_3, data = subset(df,
portfolio == "Mature"))

Residuals:
Min 1Q Median 3Q Max
-0.10673 -0.03100 -0.01297 0.02820 0.18958

Coefficients:

Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.010782 0.007560 1.426 0.15934
Mkt_Rf_3 0.009913 0.002130 4.654 0.0000204 ***
SMB_3 0.008572 0.004173 2.054 0.04463 *
HML_3 0.011192 0.004137 2.705 0.00903 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.05491 on 56 degrees of freedom
Multiple R-squared: 0.5271, Adjusted R-squared: 0.5018

F-statistic: 20.81 on 3 and 56 DF, p-value: 0.00000000349

I want to go long on the tech portfolio and short on the mature portfolio. Here is my attempt at creating the Long/Short portfolio.


LS_Portfolio <- df %>%
select(-Port_Monthly_Rets) %>%
pivot_wider(names_from = portfolio, values_from = c(R_excess)) %>%
mutate(Long_Short = Tech - Mature)

summary(lm(Long_Short ~ Mkt_Rf_3 + SMB_3 + HML_3, data = LS_Portfolio))


Which outputs:


Call:
lm(formula = Long_Short ~ Mkt_Rf_3 + SMB_3 + HML_3, data = LS_Portfolio)

Residuals:
Min 1Q Median 3Q Max
-0.248952 -0.027568 0.003106 0.029772 0.191031

Coefficients:
Estimate Std. Error t value Pr(>|t|)

(Intercept) -0.017876 0.009873 -1.810 0.07559 .
Mkt_Rf_3 0.002387 0.002782 0.858 0.39457
SMB_3 -0.018172 0.005450 -3.334 0.00152 **
HML_3 -0.012778 0.005404 -2.365 0.02154 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.07171 on 56 degrees of freedom
Multiple R-squared: 0.2307, Adjusted R-squared: 0.1895
F-statistic: 5.597 on 3 and 56 DF, p-value: 0.001983


Which appears to me to be wrong, the Mkt_Rf_3 should be significant. I get very similar regression results when I apply this to a larger portfolio of stocks.


My question is not related to programming it but how should I construct the Long / Short portfolio given that I have a number of stocks in each portfolio.


What I do is:


1) Form a portfolio of stocks based on some criteria


2) Compute the average monthly returns of each portfolio


3) Compute the excess return of the portfolio by taking the average monthly portfolio return and taking away the Risk Free rate from the Fama French data


4) Take the tech portfolio returns and subtract the mature portfolio returns.


5) Run my regression analysis (which performs poorly).


I just want to know where I am going wrong in my logic.





stochastic calculus - Dumb question: is risk-neutral pricing taking conditional expectation?



Dumb question: is risk-neutral pricing taking conditional expectation? $\tag{1}$



In trying to recall intuition for risk-neutral pricing, I think I read that we should price derivatives risk-neutrally because the risk is already incorporated in the stock or something. I also think I remember NNT saying something about how certain information is irrelevant in the expected price of oil if the information is public.



This made me think of risk-neutral pricing in terms of conditional expectation.


Simple I guess but it wasn't discussed in classes since conditional expectation and Radon-Nikodym was taught after one period model.


From what I recall of the one period model:


$$(\Omega, \mathscr F, \mathbb P) = ((u,d),2^\Omega, \text{real world}))$$ Bonds: $$\{B_t\}$$ $$B_0=1, B_1 = 1+R$$ Stocks: $$\{S_t\}$$ $$S_0 \in (0,\infty)$$ $$\mathbb P(S_1(u) = S_0u) = p_u > 0$$ $$\mathbb P(S_1(d) = S_0d) = p_d = 1 - p_u$$ European call option: $X$ $$X(u) = S_1(u) - K$$ $$X(d) = 0$$ $$\text{Price process:} \ \{\Pi(X,t)\}$$


where $t=0,1, u > 1+R > d > 0$.


It can be shown that


$$\Pi(X,0) = \frac{1}{1+R}E^{\mathbb Q}[X] = \frac{1}{1+R}(q_uX(u) + q_dX(d))$$


where $q_u, q_d$ are the risk-neutral probabilities under $\mathbb Q$, equivalent to $\mathbb P$


Also, I think $\sigma(S_1) = \sigma(X) = \{\emptyset, \Omega, \{u\}, \{d\}\}$


Dumb question rephrased:




$$\exists Z \in \mathscr L^1(\Omega, \mathscr F, \mathbb P) \ \text{s.t.} \ E^{\mathbb Q}[X] = E^{\mathbb P}[X|Z]? \tag{2}$$



Well, the left hand side is a constant while the right hand side a random variable so I'm not sure that that would make sense


How about



$$\exists Z \in \mathscr L^1(\Omega, \mathscr F, \mathbb P) \ \text{s.t.} \ E^{\mathbb Q}[X] = E^{\mathbb Q}[E^{\mathbb P}[X|Z]] \tag{3}?$$






  • For $(2)$,




  • One thing I did:




    1. $E^{\mathbb Q}[X]$ is constant and thus $Z-$measurable $\forall \ Z \in \mathscr L^1(\Omega, \mathscr F, \mathbb P)$




    2. $$\int_z E^{\mathbb Q}[X] d \mathbb P = \int_z X d \mathbb P \ \forall \ z \ \in \ \sigma(Z)$$







$$\iff E[E^{\mathbb Q}[X]1_z] = E[X1_z] \ \forall \ z \ \in \ \sigma(Z)$$ $$\iff E^{\mathbb Q}[X]E[1_z] = E[X1_z] \ \forall \ z \ \in \ \sigma(Z)$$ $$\iff E^{\mathbb Q}[X]\mathbb P(z) = E[X1_z] \ \forall \ z \ \in \ \sigma(Z)$$ $$\iff \mathbb P(z) = \frac{E[X1_z]}{E^{\mathbb Q}[X]} \ \forall \ z \ \in \ \sigma(Z)$$


There doesn't seem to be such a $Z$.



  • Another thing I did: Well, I did think of Radon-Nikodym (duh)


$$E^{\mathbb Q}[X] = E^{\mathbb P}[X \frac{d \mathbb Q}{d \mathbb P}]$$.



I guess $Z = \frac{d \mathbb Q}{d \mathbb P}$ otherwise not sure how that's relevant but I guess since $$\mathbb Q(z) = \int_z \frac{d \mathbb Q}{d \mathbb P} d \mathbb P \ \forall z \in \sigma(Z) \subseteq 2^{\Omega}$$,


$\frac{d \mathbb Q}{d \mathbb P}$ is a version of $E[\frac{d \mathbb Q}{d \mathbb P} | Z]$




  • Gee how informative. Well, I think $\sigma(Z)$ can be only either $\{\emptyset, \Omega\}$, in which case the $Z$ is any (almost surely?) constant random variable or $2^{\Omega} = \sigma(X) = \sigma(S_1)$, in which case $q_u = 1_{u}$ which would make sense iff $q_u$ is degenerate, which I guess violates equivalence assumption.




  • For $(3)$,





I guess $Z=S_1$? I'm not sure what that says. I was kinda expecting (lol) that real world probabilities $E[1_A]$ and risk-neutral probabilities $E[1_A | B] = \frac{E[1_A1_B]}{E[1_B]}$ would be like, respectively, prior $P(A)$ and posterior $P(A|B)$ probabilities.




Edit: $$\frac{d \mathbb Q}{d \mathbb P} = \frac{q_u}{p_u}1_{u} + \frac{q_d}{p_d}1_{d}$$ ?


Based on Section 4.5 of Etheridge's A Course in Financial Calculus, I guess


$$\frac{d \mathbb Q}{d \mathbb P} = (\frac{q_u}{p_u})^u(\frac{q_d}{p_d})^{1-u}$$


This avoids indicator functions in favour of exponents as in the binomial theorem, binomial model or binomial distribution.



enter image description here





cointegration - Are two identical time series cointegrated?



I did cointegration test on two identical time series, and the result shows that they are not cointegrated, but intuitively, I think they are.


Can anyone share some thoughts on this? Thanks!




mobile - What size of a button can a reasonably fat finger comfortably click?


Say my button is square shaped, in a website, and I don't want to cause inconvenience for users with big fingers (and also older people and those who forgot their glasses and aren't precise at hitting the spot).


My guess is 40 x 40 pixels is a good click area, but won't it be too small on those new full HD phone screens? I have an older phone myself so I can't try it out :X


Perhaps someone has a good rule of "fat thumb" they use for these kind of issues?



Answer




The 'fat finger' error is states a minimum of 44px x 44px (around 11mm x 11mm) is advisable for the contact patch of your finger/thumb. The 'centroid' is the first part of your finger that has contact with the screen. See below for visuals.


enter image description here


enter image description here


If you're using something like Sketch to prototype this, look at Mirr.io to see how this would look on a mobile device if you have access to test devices then you can resize accordingly.


For further reading into it see here


copyright - How can a designer decide whether a competitors design is similar enough to their own to take further action?


There is a lot of copycatting out in the world, and it's a constant legal battle fought in higher courts.


For us ants on the ground, grinding away in smaller capacities with little or no permanent legal support, how can we look at a design and say “Hey, that's a copy of my design!”?




  • Looking at these questionable examples as if one of them was your design, how would you evaluate if the similarities between them are enough for you to take further action, such as consult a lawyer?




  • What elements would you look at and compare?





Various ambiguous product designs




quant trading strategies - Questions on continuously compounded return vs long term expected return


I have reading a paper from Oliver Grandville on long term expected return. I am trying to reconcile what I am reading in that paper vs what I see under "Application to Stock Market" in Kelly criterion page on Wikipedia.


http://www.cfapubs.org/doi/abs/10.2469/faj.v54.n6.2227


https://en.wikipedia.org/wiki/Kelly_criterion


In his paper, he define the following:




  1. $R_{t-1,t} = \frac{S_t-S_{t-1}}{S_{t-1}}$ as the yearly rate of return compounded once per year

  2. $X_{t-1,t} = 1 + R_{t-1,t} = \frac{S_t}{S_{t-1}}$ as the yearly dollar return

  3. $log \left( X_{t-1,t} \right) = log \left(\frac{S_t}{S_{t-1}}\right)$ as the yearly continuously compounded rate of return

  4. $E(X_{t-1,t}) = E(1+R_{t-1,t})$ as the expected value of the yearly dollar return and $V(X_{t-1,t})$ as its variance


He derives that given $log \left( X_{t-1,t} \right) = log \left(\frac{S_t}{S_{t-1}}\right) = \mu + \sigma N(0,1)$ (ie log returns follow normal distribution of mean $\mu$ and variance $\sigma^2)$, we must have that $E(X_{t-1,t}) = exp \left( \mu + \frac{\sigma^2}{2}\right) $.


My questions are:



  1. For the wiki article vs this article, the wiki one says expected log return is $R_s = \left( \mu - \frac{\sigma^2}{2}\right)t$. This seems similar to the Grandville article in that if you take $log(E(X_{t-1,t})) = \mu + \frac{\sigma^2}{2}$, but its not exactly the same. Is the because the assumption the wiki article makes is different (ie the stock price moves like Brownian motion?)


  2. In the derivation of the max of the expected value in wiki page. Shouldnt it be $G(f) = fE(stock) + (1-f)E(bond)=f*(\mu - \frac{\sigma^2}{2}) + (1-f)*r$, but the vol term is different ($f^2$ vs $f$). Why is that?

  3. Finally, the last line of the wiki article mentions that "Remember that $ \mu $ is different from the asset log return $R_s$. Confusing this is a common mistake made by websites and articles talking about the Kelly Criterion." My understanding is that $\mu$ is the expected of the log returns $E(log(X_{t-1,t}))$ whereas $R_s$ is the log of the expected returns $log(E(X_{t-1,t}))$ and that this distinction is important because $E(log(X))$ and $log(E(X))$ are not always equal. Is this understanding correct?




layout - Common screen resolution?


I'm developing a web application which is quite information heavy. This means that every pixel available in the screen for display helps a lot, to avoid the UI looking too cluttered and to display relevant data.


I was wondering: which is the "common" screen resolution? Years ago it was something like 1024×768, but nowadays it must be something much higher. I can't rely on what I use as I'm a developer and I probably have bigger screens and resolution than the average Joe user.


So, where can I find the currently recommended resolution for webapps?



Answer



That really depends on where you are in the world. Worldwide 1366x768 is still the most common, however 1920x1080 is the only resolution that is actually increasing in take-up (presumably because this seems to be the standard widescreen for modern laptops).


The website StatCounter.com should help give you some further knowledge on this.


HOWEVER, bear in mind that just because certain resolutions are more common than others this it doesn't actually take into account how wide the user has their browser window. Unfortunately, there are few known measurements for this statistic (Google analytics used to provide this, but have ceased supporting it).


style - Scrivener customising the header and footer



To my understanding you can only edit the header and footer through the compile settings. Here we can customise using tokens:-


<$compilegroup>
<$projecttitle>
<$abbr_projecttitle>
<$sectiontitle>
<$p>

So on... What I would really like is to have facing pages which I have set up correctly and have headers such as:-


Page number | Chapter 1 : Sub title


Here is where it gets slightly complicated. I don't want this on my chapter headings. The options Scrivener gives are:-




  1. No header on first page and pages following page breaks.

  2. No header or footer on single pages.


Problems


Lets say I have a chapter description and it goes over one page, this invalidates number 2.


Page breaks, by using this the layout gets quite messy and the headings will appear as:-


Page number | Chapter 1 : Chapter 1 Binder title


If anyone can advise a possible solution, perfect.



Answer




Response from Scrivener Staff:


I'm afraid that there are limits to how much headers and footers can be customised from within Scrivener itself and you've hit up against that. While Scrivener is capable of creating verso headers and footers (right and left), and it can create a different header/footer style for the "first pages" of the manuscript, it cannot create a separate header/footer for the first page of each chapter.


I'm afraid this level of customisation would have to be done by compiling to Word and making the changes there.


Credits go to: Jeff


from


Literature and Latte Support


Sunday, February 22, 2015

adobe photoshop - Keep pixels crisp when rotating object?


I noticed that when rotating an object in Photoshop the preview of the image has nice and crisp pixels, but when I rotate the image and finish the transformation it adds an annoying blur. Is it possible to disable that or find a good workaround?


The carrot stays nice and pixelated in the preview.



enter image description here


But it ends up being blurred when I confirm the transformation.


enter image description here




Saturday, February 21, 2015

tables - When your page has no results, what do you show?


I am paginating a data table and have different views in my application where each view has its own rows. Some views may have data, some may not.



Showing 1-0 of 0 Page 1 of 0




is what I am showing on a page with no rows.


If I had some rows to display, it would be



Showing 1-30 of 45 Page 1 of 1



What do I display in the empty case?


Some possibilities:






  1. Showing 0-0 of 0 Page 1 of 1






  2. Showing 0-1 of 1 Page 1 of 1






What do I do here?



Answer



For this situation you can use an empty state which can be just text or a graphic with text and an action button.


Example of an empty state from Product Hunt:


enter image description here


Good empty states will give the users an action button which can push them in the right direction. A button with something like "Rephrase your search" might work in this case.


It doesn't make sense to show any pagination because there are no results let alone one or even half a page of results.


Using a picture which had been modified beyond recognition. Is that copyright infringement?



Say I take this pic:



enter image description here


and turn it into this (plus adding title and name of author):


enter image description here


And then use it as a cover for a book at Amazon.


Is that copyright infringement?




How much should a UX professional know about front-end development?


Apologies if this is too much of a fuzzy question, I was wondering what people's thoughts were regarding the level of front-end development knowledge a UX professional (Experience Architect, Usability designer, Experience Designer - call it what you will) should have.


I'm guess I'm talking about situations where the two disciplines are handled by separate teams (UX team handle wireframes/designs/user journey and the front-end team actually do the coding).


Do you think the UX team can make do with a general level of front-end knowledge (basic understanding of HTML/CSS), or is it important for them to know the nitty gritty (semantic page structure, optimisation techniques, impact of JavaScript, graceful degradation/progressive enhancement, accessibility etc)?


Should a UX team be able to imagine how their designs/wireframes will be interpreted by the front-end team and what mark-up/technologies are likely to be used?


Does only having a limited knowledge of front-end development make for poorer UX?


Are the finer points of FE development solely the concern of the front-end devs, or should it be a consideration for the UX team as well?


As I said, I know it's a bit of a fuzzy question, but I'm just curious as to how people view the respective skills of FE and UX teams, and how much blurring there should ideally be between the two.



Answer




As a UX person who works in a situation like you describe (UX creates the specs, FE implements them), I can say that it is vitally important that my team know what is/is not possible when designing a UI. If something's completely impossible, we do our stakeholders a disservice by proposing it.


On the other hand, given that only a few member of our team members have formal coding experience, we always work in tandem with our developers. Often we'll sit down with the development team prior to presenting our designs to the stakeholders and discuss the potential coding pain points.


In particular, I believe that it is vitally important that UX folks have (at least) a theoretical understanding of "FE-related things", including semantic page structure, optimization techniques, impact of JavaScript, graceful degradation/progressive enhancement, accessibility, etc. Of course, there's always the viewpoint of Jared Spool; that in the future, all UX'ers will beed to be able to code (a viewpoint I don't necessarily agree with).


sec - Central Index Key (CIK) of all traded stocks


Is there a way by which I can get a list of CIK of all registered stocks at the SEC?




Friday, February 20, 2015

How can non-designers learn to approve a print layout?


I am not a designer, I am a scientist. I write papers in Word or LaTeX, the conference organisers give me a template with fonts, rules like "Caption for figures go below the figure, captions for tables go below the table", etc. I submit a paper in this template, which is reviewed. If it is accepted, I submit the paper (minor corrections are allowed) to the proceedings publishers as a pdf file. The submission system does some very crude automated checking (fonts embedded, page number not over limit) before accepting the file. At some point, a human looks over the file and mails me if there are any problems found. And for me, there are always problems.


I am not a tidy person. Not only don't I righten the proverbial misaligned picture, I don't even notice there's a problem with it. So I don't catch the cosmetic errors with the layout of my files. I look only for the very big things, like whether there is half a page of blank space, and whether the two columns in the ACM layout align on the last page. If there are none, I submit. And then always get requests to repair things like tables running 1 mm into the margins, or the bottom quarter of a line hidden behind a figure. This wastes quite a lot of time for both me and the publisher who waits for me.


Obviously, I need to learn how to proof-look (is there a real word for that?) my layouts better, but I don't know where to start. Is there something like a check list which can teach me what to look for? Can you point me to a good one? I guess there are thousands of things which can go wrong, but I am probably falling into the most common newbie traps, so even the simplest list of known "problem areas" will be an improvement. If there are some general guidelines on how to look, or tricks, or even an easy tool which can take my pdf and point out inconsistencies (but please no heavy-weight design package with built-in checking), I'd be happy to hear about these too.


Edit: I do compose the text with the final layout. My professor insists on this for several reasons, chiefly because there is a hard upper limit on the number of pages and we must judge the length of each chapter and sub-chapter at each revision (2-3 revisions per week) to be sure the final text will fit. Besides, I make many figures and almost all tables directly in Word. Composing the content without the final formatting would be very inefficient in this case.



Answer



You keep asking for a checklist, so let me start one for you. I'll even make this a wiki so everyone else can pile on.




  • Headlines are in the correct font and size.

  • Type is in the correct font and size.

  • No images or tables violate the margins.

  • No extra return between headline and text.

  • No half page of blank space.

  • Words are not hyphenated over a page break.

  • Look at the top, left, right, and bottom margins of every image or table which breaks the flow of text. Is any text cut off? Is any text IN the image or text cut off or unreadable?

  • Does every image or table have a source?

  • Is there a header? is it correctly formatted?


  • Is there a footer? is it correctly formatted?

  • Check for fraction glyphs to confirm they are fractions and not corrupted dingbats. (you may have to skim your text throughout unless you made notes where they are.)


jump in when you know the words, gang.


fx - How trading in currency pair works, underlying techniques and mechanisms



I am somewhat experienced in Forex trading, but I have a question which has bothered me for quite some time.


If we for instance go back in time four months, to before the beginning of value loss the RUB(RUBLE).


Say that I wanted to make money on the loss of value of the RUB, with my Forex account being based on SEK.


What I am confused about is this, what is the difference in the amount of money I make, if, we assume that USD/RUB and SEK/RUB will both increase 10% over the next time period, which also means that the USD/SEK will increase/decrease 0% against one and other.


Lets also assume that all currency pairs have an initial 1:1 ratio. 100 SEK = 100 USD = 100 RUB.


Mechanism A)



If I buy 100 SEK in the USD/RUB currency pair, my prior understanding was that I am actually buying 100 USD. My 100 SEK are therefore first exchanged for 100 USD. When the value of the USD/RUB over the next period goes up 10%. I sell my 100 USD. But what do I then sell it for?


1) Do I get RUB? Ok, my 100 USD now gets me 110 RUB.


2) Do I get SEK? Ok, my 100 USD now gets me 100 SEK, so that scenario is out.



Then now, we continue with 1). When my 110 RUB are exchanged back for SEK, I should get 110 RUB/(1.1SEK/1RUB) = 100 SEK. Therefore I did not make any money on the shorting of RUB through USD/RUB. Despite the RUB loosing value against the USD! But this can't be true. So how does the underlying mechanism work? My understanding is, and the above example shows, that it doesn't matter if you buy USD/RUB or USD/SEK currency pairs, since what you are buying is essentially USD in both cases.


But I don't believe this scenario is correct. What is then the correct underlying mechanisms to facilitate a transaction where you can make money on shorting the RUB, or as I have been thinking, the increase of value of USD versus the RUB. I used to think that I am buying USD, so it doesn't matter what currency pair, USD/RUB or USD/SEK. But as I write this question now, I am getting a different understanding.



My second possible scenario for how this might go is this:


Mechanism B)



When I "buy" 100 SEK worth of USD/RUB, I am actually lending 100 RUB from the market, selling it immediately for 100 USD, then when the price of USD/RUB goes up 10%, to 110 RUB I sell my 100 USD getting 110 RUB. I then return the 100 RUB to the lender, keeping 10 RUB. I then sell the 10 RUB for SEK, keeping 10/(1.1SEK/RUB) = 9.09 SEK, for a total profit of 9.09%, despite the USD/RUB, SEK/RUB actually having increased 10%. It would also mean that it is better were you can to trade directly in the currency pair you have, SEK/RUB rather than USD/RUB if your account is in SEK. Then you would have made 10% rather than 9.09% without any additional costs of transactions. ( I find this a bit puzzling though, need to think about this. )



This scenario is kind of strange because you are lending 100 RUB, then selling it for 100 USD, meaning that you could also just be lending 100 USD directly, or buying actual 100 USD, omitting the lender, but then we would end up in Mechanism A) again. The lender is needed, so you are never actually buying any currency. You are lending the other currency pair, and buying USD.


Note that I am kind answering the question as I formulate it, which is something I had difficulties doing for myself earlier. It pays to write questions and try to explain them :)



The second scenario would allow for a profit to be made as we can see, and one that seems to be the way it must be done.


But this also constitutes a difference in how some people normally seem to think of trading in Forex, and how the Forex platform buttons usually say, "Buy" and "Sell".


My original idea is that when you "buy" USD/RUB, it is the same as buying USD currency so it won't matter if it is USD/SEK, or USD/EUR, because it is perceived as the net result is you buying USD. It shouldn't matter what currency pair. You might even save the last exchange cost doing.


This is the way people normally seem to explain it, that you are buying USD. But you are obviously not buying USD when "buying" USD/RUB as if you were "buying" a stock. You are lending RUB, selling it for USD, selling the USD later and returning the original RUB.


When you buy a stock, you are indeed buying it. Possibly not even so in CFD' markets? When you are shorting a stock, you enter the lending mechanisms.


However, in Forex currency pair trading, it must be that you are always in the lending mechanism.



It would also explain how despite your account being in SEK, you could make money on going long on the SEK/RUB or "buying" SEK with the same amount of SEK as in your account. You are not buying SEK, you are initially lending 100 RUB, selling it for 100 SEK, making it 200 SEK in your account, and then buying 100 RUB for 90.9 SEK later, returning them, keeping (200-90.9)SEK = 109.1 SEK.



Despite the direction, you are always kind of in the mechanisms of shorting/blanking.



Is this the correct understanding?


Sorry for this long post.




Thursday, February 19, 2015

editing - Submitting a novel for publication: do editors still expect Courier font?



About ten years ago an agent told me not to submit manuscripts in fonts other than Courier (or Courier New) and to double-space lines. He said editors were prejudiced against manuscripts that looked like they were written on a word processor (as opposed to a typewriter, I guess).


Assuming this was ever true, do editors still expect to see the monospace Courier font?



Answer



A significant proportion of agents and editors still want submissions in Standard Manuscript Format, which includes using a serif monospace font such as Courier. Many of them have become less fussy about the particular font and will also accept a proportional font such as Times Roman. However, in no case should you use a non-serif font, or anything that you wouldn't use in business correspondence. Double-spacing is still pretty much a universal requirement.


In general, you'll always be safe by sticking to the most conservative standard, as no one will be bothered by it, and some people still require it.


Is there a way to expand linked EPS file placed inside another EPS file in Illustrator?



I've placed an EPS file (File A) inside another EPS file (File B) and now need to completely break this link so that the artwork of File A becomes 100% editable part of File B.


I've tried embedding it via Save As when saving FileB and that seems to keep the link to FileA active.


I do not want File A to be linked in any way and need the artwork of File A to be on same layer as the artwork of File B so that I can edit all artwork together.


I also do not want to have any links shown in the Illustrator links panel.


Please let me know how/if this can be accomplished?


Thank you!




forms - Which button should get the focus at delete dialogs?


I thought that most destructive actions should be avoided from default actions. But when a delete dialog comes, I see that most Windows applications (even the OS), by default, set the focus at "Yes"/"Delete" button. On Mac OS X, instead, I see the following at their design guidelines:



...


Avoid providing click-through for an item or action whose result might be dangerous or undesirable. Specifically, avoid enabling click-through for an item that:


• Performs a potentially harmful action that users can’t cancel (for example, the Delete button in Mail)" ...




Which one is the best approach?



Answer



I think the answer to whether the destructive "delete" should be the default action or not highly depends on the context in which the dialog occurs. If the dialog was the result of an action that expresses a clear destructive intent, like for example clicking "empty trash", the user probably knows what the consequences are, so it makes most sense to have the affirmative "yes, I really want to empty the trash" confirmation be the default action (enter confirms, space or escape cancels): empty trash dialog


In such cases it could potentially be very annoying if there is no easy way to confirm the action that the user just performed ("yes, of course I want to empty the trash, I just clicked that, didn't I?!").


If, on the other hand, the dialog occurs to warn the user of a potentially destructive side effect of something they did, it makes more sense to err on the side of caution. A good example of this is the dialog that occurs when you close an unsaved document. In that case it is unclear if the user intended to abandon the changes, so the destructive action is not the default:


confirm closing an unsaved document


So, even though Apple's Human Interface Guidelines on dismissing dialogs states "Use a default button only if the user’s most likely action is harmless", I would say: use a default button only if the user’s most likely action is harmless and is not a clear extension of the action that triggered the dialog (e.g. it's almost impossible to empty the trash by accident, but it would be bad to accidentally lose all changes in a document after closing a window).


creative writing - How can I introduce languages that will be spoken in the long term?


My story is a little bit weird because it starts in a Spanish speaking country and then moves to Japan where everybody speaks japanese and I don't know how to introduce this new language that will be spoken for almost the rest of the book.




Extra notes:


My Main Character speaks fluent Spanish, English and Japanese.


My MC is a 15 y.o. mixed girl.


Some other speaking language Characters will appear in the future.



Answer



Does it actually matter to the story that the language they are speaking changes? Most of the time in international stories, the difference is language is not germane to the plot in any way and is simply ignored.


A well-told story focuses the reader's attention on the elements that matter to the story. It does this first and foremost simply by leaving out any mention of environmental factors that don't impact the story directly. Thus they don't talk about the weather unless it affects the story. They don't talk about food unless it affects the story. They don't talk about clothing unless it affects the story. And they don't talk about language unless is affects the story.



So unless it affects the story, simply don't mention it at all.


If it does affect the story, though, then how you handle it depends on how it affects the story and you will have to tell us that before we can suggest anything meaningful.


usability - email field or username for logging in an application?


What is the best solution for an app : Email or username field?


I like email because:



  • it's unique

  • user will easily remember

  • it's personal (which can be a disadvantage sometimes; Multiple users on the same account)


Unfortunately we usually have to type more letters to login (write the name + @domain.com)




Answer



Neither is universally better, but you don't have to choose. Use both.


It's trivial to test whether an input field is an email or a username (check whether it contains @), so you don't even need a separate field for it. Just have an Email / username field.


Each has different strengths, so if you have to use one, choose what matters most to your application and customers. Usernames are shorter, you often can't have the username you want in an application, so you end up with different usernames which you can easily forget. Emails are harder to forget as there is more consistency than with usernames.


adobe photoshop - What is HSB really?



Can any of my graphics designer friends explain HSB to me? I know it's hue/saturation/brightness and I know what those three do (for the most part)...


I understand the algorithm of creating colors behind RGB, but what about HSB? The hue is just the colors radial position on the color wheel right? But what do saturation and brightness do? (I know one washes the color out (towards grey) and the other lightens or darkens the color...) but what do they do on the color wheel? Hue is radial position? I'm assuming brightness says whether the color location is closer to the center of the wheel or closer to the edge of the wheel, but then where does saturation come into play?


Also, is black even on the color wheel? Or is it actually like a color cylinder where the center travels from white (on the bottom face) to black (on the top face) and saturation chooses the z-position of the color location?


What I'm really trying to understand is, in different lighting would my skin (assuming it's all almost the same color) always have about the same hue but different brightness, and on cameras with different exposure would my skin always have the same hue but different saturation?



Answer



Great question! To take the last part first, your skin hue would be the same no matter the brightness of incident light, provided the color of the light didn't change. That's why "Select skin tones" works in Photoshop CS6 and later. In broadcast video work, there's a commonly-used tool called a vectorscope that will prove to you, if you ever test it out, that ALL human skin falls into the same very narrow hue range. There's a demonstration of this in an excellent video tutorial by Andrew Devis on Creative Cow.


At base, all the different color models seem to me to fall into three categories: defining color as we describe it, as we generate it and as we perceive it.


HSB (also HSV) is a way to define color based on how we describe it (e.g., "dark reddish-brown"). This is the one that uses a color wheel -- not the same as the artists' color wheel, by the way. It came in when we got on-screen color, as a way to try to describe color more intuitively than with RGB numbers.


Hue is the quality that we might describe as the "basic color" of something. It's given an angular value on the color wheel.


Saturation is the "purity" of the color, also known as "chromaticity," especially in TV and video work. A yellow that can't get any yellower is fully saturated. To desaturate a color you add grey (or you subtract color leaving grey behind -- pick whichever description seems more intuitive).



Brightness is determined by how much black is mixed with the color. Colors are not all perceived as being the same brightness, even when they are at full saturation, so the term can be misleading. Brightness is best thought of as the z-axis of a color cylinder. Value is a better term, in my opinion, because it doesn't imply perceived lightness or darkness. A fully saturated yellow at full brightness (S 100%, B 100%) is brighter to the eye than a blue at the same S and B settings.


Here's the cylinder, filched from Wikipedia:


enter image description here


In the Photoshop default color picker, the rectangle is a "slice" of the color cylinder. The hue bar determines the slice you're looking at, then in the rectangle right-left changes saturation, up-down changes brightness.


RGB, like CMYK, is a mechanical specification related to how devices generate it. The color you actually see for a given set of RGB values depends on the color gamut (sRGB, Adobe RGB) and the color profile and physical characteristics of the device it's displayed on.


Lab is an attempt to define color based on how we actually perceive it, and is the only device-independent way that colors are currently defined. The Lab color model covers every perceptible color and a large range of "impossible" colors besides, such as "pure yellow black." See Dan Margulis' brain-cracking but brilliant book "Photoshop LAB Color" for an in-depth practical text on using Lab in Photoshop.


Wednesday, February 18, 2015

smartobject - 'Un-smart' object in Photoshop



I've created a design in Photoshop CS6, and used a large number of smarts object which made the workflow more easy (at least for me). Now I've finished working on the design, and I want to "unsmart" all the objects due to the large file size of the PSD. I do not want to do Rasterize Layer because I want to keep every layer which was originally on the Smart Object. I want to convert each smart object (some of them have Layer Styles applied) to a group (folder) which will have all the layers inside + the FX applied originally to the Smart Object and it will be in the exact location of where the smart object was before.


I couldn't find anything about this in the internet.


Also, some of the smart objects has inner smart objects inside of them. I don't mind doing this manually, but to copy & paste every layer in smart object is very annoying way, because I must scale and transform the layers pasted.



Answer



I first tried Captain Awesome script but not suit to me, so I wrote my own. But it will not works on CS6. Supported version is PS CC 2015.1.2+


Features



  • Puts content exactly on the same place.

  • Works with multiple layers simultaneously.

  • Respects selected composition in the smart object.


  • Scales content if the "SO" has different size.

  • Also scales layer effects.


Download here: http://bereza.cz/ps/


technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...